Staging
v0.5.1
https://github.com/python/cpython
Revision 008ec689be2b6181259f6493eb5e90119c3d2f65 authored by Guido van Rossum on 15 October 1996, 14:40:41 UTC, committed by Guido van Rossum on 15 October 1996, 14:40:41 UTC
1 parent 4808dcb
Raw File
Tip revision: 008ec689be2b6181259f6493eb5e90119c3d2f65 authored by Guido van Rossum on 15 October 1996, 14:40:41 UTC
Added warning not to import directly.
Tip revision: 008ec68
dl_nt.c
/*

Entry point for the Windows NT DLL.

About the only reason for having this, is so initall() can automatically
be called, removing that burden (and possible source of frustration if 
forgotten) from the programmer.

*/
#include "windows.h"

/* NT and Python share these */
#undef INCREF
#undef DECREF
#include "config.h"
#include "allobjects.h"

HMODULE PyWin_DLLhModule = NULL;

BOOL	WINAPI	DllMain (HANDLE hInst, 
						ULONG ul_reason_for_call,
						LPVOID lpReserved)
{
	switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH:
			PyWin_DLLhModule = hInst;
			initall();
			break;
		case DLL_PROCESS_DETACH:
			break;
	}
	return TRUE;
}
back to top