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.
58 lines
930 B
58 lines
930 B
|
|
// - - - - - - - - -
|
|
|
|
// LIBMAIN.C
|
|
//
|
|
// This file contains the default forms of the DLL library initialization
|
|
// and cleanup functions.
|
|
|
|
// - - - - - - - - -
|
|
|
|
#include <mvopsys.h>
|
|
#include <mvsearch.h>
|
|
|
|
|
|
#ifndef _NT
|
|
PRIVATE HANDLE NEAR s_hModule;
|
|
|
|
// - - - - - - - - -
|
|
|
|
PUBLIC BOOL FAR PASCAL LibMain(
|
|
HANDLE hModule,
|
|
CB cbHeapSize,
|
|
LSZ lszCmdLine)
|
|
{
|
|
s_hModule = hModule;
|
|
return TRUE;
|
|
}
|
|
|
|
#else
|
|
|
|
PUBLIC BOOL FAR PASCAL LibMain( HANDLE hModule, BOOL bAttaching)
|
|
{
|
|
return TRUE;
|
|
}
|
|
#endif
|
|
|
|
#ifdef _NT
|
|
|
|
BOOL WINAPI DllMain( hinstDll, fdwReason, lpvReserved )
|
|
HINSTANCE hinstDll; /* Handle for our convenience */
|
|
DWORD fdwReason; /* Why we are called */
|
|
LPVOID lpvReserved; /* Additional details of why we are here */
|
|
{
|
|
|
|
switch( fdwReason )
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
LibMain( hinstDll, 0 );
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
break;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
#endif
|