Follow Building C and C ++ Extensions on Windows - section 7 says:
spam.pyd( Release) spam_d.pyd( ). .pyd , spam.dll, Python
...
2.5: , spam.dll( ) spam_d.dll( ).
DLL .pyd .dll.
(, )
C , INIT,
PyMODINIT_FUNC initexample(void). DLL example.pyd:
#include "Python.h"
static PyObject *
ex_foo(PyObject *self, PyObject *args)
{
printf("Hello, world\n");
Py_INCREF(Py_None);
return Py_None;
}
static PyMethodDef example_methods[] = {
{"foo", ex_foo, METH_VARARGS, "foo() doc string"},
{NULL, NULL}
};
PyMODINIT_FUNC
initexample(void)
{
Py_InitModule("example", example_methods);
}