Documentation clarified to mention optional parameters.
[python.git] / PC / dl_nt.c
blob2608f7e7aaf101454b5d70c70bec478d8eeb6a7c
1 /*
3 Entry point for the Windows NT DLL.
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.
9 */
10 #include "windows.h"
12 /* NT and Python share these */
13 #include "pyconfig.h"
14 #include "Python.h"
16 char dllVersionBuffer[16] = ""; // a private buffer
18 // Python Globals
19 HMODULE PyWin_DLLhModule = NULL;
20 const char *PyWin_DLLVersionString = dllVersionBuffer;
23 BOOL WINAPI DllMain (HANDLE hInst,
24 ULONG ul_reason_for_call,
25 LPVOID lpReserved)
27 switch (ul_reason_for_call)
29 case DLL_PROCESS_ATTACH:
30 PyWin_DLLhModule = hInst;
31 // 1000 is a magic number I picked out of the air. Could do with a #define, I spose...
32 LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer));
33 //initall();
34 break;
35 case DLL_PROCESS_DETACH:
36 break;
38 return TRUE;