mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1016 B
47 lines
1016 B
//+--------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
// Copyright (C) Microsoft Corporation, 1996-1996
|
|
//
|
|
// File:
|
|
//
|
|
// Contents:
|
|
//
|
|
// History:
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
#include <windows.h>
|
|
|
|
BOOL WINAPI _CRT_INIT(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved);
|
|
|
|
void TLSShutdown();
|
|
|
|
BOOL WINAPI DllMain(IN HINSTANCE hinstance,
|
|
IN DWORD reason,
|
|
IN LPVOID reserved)
|
|
{
|
|
switch(reason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
if (!_CRT_INIT(hinstance, reason, reserved))
|
|
{
|
|
return(FALSE);
|
|
}
|
|
|
|
DisableThreadLibraryCalls(hinstance);
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
TLSShutdown();
|
|
|
|
if (!_CRT_INIT(hinstance, reason, reserved))
|
|
{
|
|
return(FALSE);
|
|
}
|
|
break;
|
|
|
|
}
|
|
|
|
return(TRUE);
|
|
}
|
|
|