Guido van Rossum | 6dbd190 | 1996-08-21 15:03:37 +0000 | [diff] [blame] | 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 */ |
Guido van Rossum | 6dbd190 | 1996-08-21 15:03:37 +0000 | [diff] [blame] | 13 | #include "config.h" |
Guido van Rossum | a1ebdbd | 1997-05-05 22:18:50 +0000 | [diff] [blame^] | 14 | #include "Python.h" |
Guido van Rossum | 6dbd190 | 1996-08-21 15:03:37 +0000 | [diff] [blame] | 15 | |
| 16 | HMODULE PyWin_DLLhModule = NULL; |
| 17 | |
| 18 | BOOL WINAPI DllMain (HANDLE hInst, |
| 19 | ULONG ul_reason_for_call, |
| 20 | LPVOID lpReserved) |
| 21 | { |
| 22 | switch (ul_reason_for_call) |
| 23 | { |
| 24 | case DLL_PROCESS_ATTACH: |
| 25 | PyWin_DLLhModule = hInst; |
Guido van Rossum | a1ebdbd | 1997-05-05 22:18:50 +0000 | [diff] [blame^] | 26 | //initall(); |
Guido van Rossum | 6dbd190 | 1996-08-21 15:03:37 +0000 | [diff] [blame] | 27 | break; |
| 28 | case DLL_PROCESS_DETACH: |
| 29 | break; |
| 30 | } |
| 31 | return TRUE; |
| 32 | } |