Mercurial > cpython-lru_cache-weakref
annotate PC/dl_nt.c @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 78d398005bab |
| children | 2e40e27f8b26 |
| rev | line source |
|---|---|
|
4087
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 /* |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 Entry point for the Windows NT DLL. |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 About the only reason for having this, is so initall() can automatically |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 be called, removing that burden (and possible source of frustration if |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 forgotten) from the programmer. |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 */ |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 #include "windows.h" |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 /* NT and Python share these */ |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 #include "config.h" |
|
5412
78d398005bab
Use Python.h, not allobjects.h.
Guido van Rossum <guido@python.org>
parents:
4087
diff
changeset
|
14 #include "Python.h" |
|
4087
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
15 |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 HMODULE PyWin_DLLhModule = NULL; |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 BOOL WINAPI DllMain (HANDLE hInst, |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
19 ULONG ul_reason_for_call, |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
20 LPVOID lpReserved) |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
21 { |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
22 switch (ul_reason_for_call) |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
23 { |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
24 case DLL_PROCESS_ATTACH: |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
25 PyWin_DLLhModule = hInst; |
|
5412
78d398005bab
Use Python.h, not allobjects.h.
Guido van Rossum <guido@python.org>
parents:
4087
diff
changeset
|
26 //initall(); |
|
4087
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 break; |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
28 case DLL_PROCESS_DETACH: |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
29 break; |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 } |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 return TRUE; |
|
740def697d8b
NT specific files supplied by Mark Hammond
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 } |
