home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / PC / dl_nt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-17  |  646 b   |  35 lines

  1. /*
  2.  
  3. Entry point for the Windows NT DLL.
  4.  
  5. About the only reason for having this, is so initall() can automatically
  6. be called, removing that burden (and possible source of frustration if 
  7. forgotten) from the programmer.
  8.  
  9. */
  10. #include "windows.h"
  11.  
  12. /* NT and Python share these */
  13. #undef INCREF
  14. #undef DECREF
  15. #include "config.h"
  16. #include "allobjects.h"
  17.  
  18. HMODULE PyWin_DLLhModule = NULL;
  19.  
  20. BOOL    WINAPI    DllMain (HANDLE hInst, 
  21.                         ULONG ul_reason_for_call,
  22.                         LPVOID lpReserved)
  23. {
  24.     switch (ul_reason_for_call)
  25.     {
  26.         case DLL_PROCESS_ATTACH:
  27.             PyWin_DLLhModule = hInst;
  28.             initall();
  29.             break;
  30.         case DLL_PROCESS_DETACH:
  31.             break;
  32.     }
  33.     return TRUE;
  34. }
  35.