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.
45 lines
780 B
45 lines
780 B
|
|
#include <windows.h>
|
|
#include "gutils.h"
|
|
#include "gutilsrc.h"
|
|
|
|
/* dll global data */
|
|
HANDLE hLibInst;
|
|
extern void gtab_init(void);
|
|
extern BOOL StatusInit(HANDLE);
|
|
|
|
#ifdef WIN32
|
|
BOOL WINAPI LibMain(HANDLE hInstance, DWORD dwReason, LPVOID reserved)
|
|
{
|
|
if (dwReason == DLL_PROCESS_ATTACH) {
|
|
hLibInst = hInstance;
|
|
gtab_init();
|
|
StatusInit(hLibInst);
|
|
}
|
|
return(TRUE);
|
|
}
|
|
|
|
#else
|
|
|
|
WORD wLibDataSeg;
|
|
|
|
|
|
BOOL FAR PASCAL
|
|
LibMain(HANDLE hInstance, WORD wDataSeg, WORD cbHeap, LPSTR lpszCmdLine)
|
|
{
|
|
hLibInst = hInstance;
|
|
wLibDataSeg = wDataSeg;
|
|
|
|
gtab_init();
|
|
StatusInit(hLibInst);
|
|
return(TRUE);
|
|
|
|
}
|
|
#endif
|
|
|
|
/* needed for win16 - but does no harm in NT */
|
|
int FAR PASCAL
|
|
WEP (int bSystemExit)
|
|
{
|
|
return(TRUE);
|
|
}
|