home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2446 < prev    next >
Encoding:
Text File  |  2004-09-20  |  563 b   |  22 lines

  1. // Note: this sample does nothing useful other than to show you how
  2. // your own Python extension can link with and use the functions from
  3. // pywintypesxx.dll
  4. #include "Python.h"
  5. #include "PyWinTypes.h"
  6.  
  7. static struct PyMethodDef win32extension_functions[] = {
  8.     0
  9. };
  10.  
  11. extern "C" __declspec(dllexport)
  12. void initwin32_extension(void)
  13. {
  14.   // Initialize PyWin32 globals (such as error objects etc)
  15.   PyWinGlobals_Ensure();
  16.  
  17.   PyObject *module;
  18.   module = Py_InitModule("win32_extension", win32extension_functions);
  19.   if (!module)
  20.     return;
  21. }
  22.