source: vendor/python/2.5/PC/dl_nt.c

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 908 bytes
Line 
1/*
2
3Entry point for the Windows NT DLL.
4
5About the only reason for having this, is so initall() can automatically
6be called, removing that burden (and possible source of frustration if
7forgotten) from the programmer.
8
9*/
10#include "windows.h"
11
12/* NT and Python share these */
13#include "pyconfig.h"
14#include "Python.h"
15
16char dllVersionBuffer[16] = ""; // a private buffer
17
18// Python Globals
19HMODULE PyWin_DLLhModule = NULL;
20const char *PyWin_DLLVersionString = dllVersionBuffer;
21
22
23BOOL WINAPI DllMain (HANDLE hInst,
24 ULONG ul_reason_for_call,
25 LPVOID lpReserved)
26{
27 switch (ul_reason_for_call)
28 {
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;
37 }
38 return TRUE;
39}
Note: See TracBrowser for help on using the repository browser.