Fix comment.
[python.git] / PC / dl_nt.c
blobe143c780ac4b23dfaf3d27cd45338683afa8849d
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 */
11 #include "Python.h"
12 #include "windows.h"
14 #ifdef Py_ENABLE_SHARED
15 char dllVersionBuffer[16] = ""; // a private buffer
17 // Python Globals
18 HMODULE PyWin_DLLhModule = NULL;
19 const char *PyWin_DLLVersionString = dllVersionBuffer;
22 BOOL WINAPI DllMain (HANDLE hInst,
23 ULONG ul_reason_for_call,
24 LPVOID lpReserved)
26 switch (ul_reason_for_call)
28 case DLL_PROCESS_ATTACH:
29 PyWin_DLLhModule = hInst;
30 // 1000 is a magic number I picked out of the air. Could do with a #define, I spose...
31 LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer));
32 //initall();
33 break;
34 case DLL_PROCESS_DETACH:
35 break;
37 return TRUE;
40 #endif /* Py_ENABLE_SHARED */