/*
** LIBMAIN.C - This is the module containing the initialization code for the
** ODS resource DLL.
**
** (C) Copyright 1992-1994 By Microsoft Corp.
*/
#define WINVER 0x030A // prevent Windows 3.1 feature usage
#include "windows.h"
/* DLLinitialization functions */
#ifdef _WIN32
INT __stdcall LibMain(HANDLE hInst,
DWORD ul_reason_being_called,
LPVOID lpReserved)
{
switch (ul_reason_being_called)
{
case DLL_PROCESS_ATTACH:
// Initilize global variable here !!!
break;
case DLL_THREAD_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_DETACH:
break;
default:
break;
} /* switch */
return TRUE;
UNREFERENCED_PARAMETER(hInst);
UNREFERENCED_PARAMETER(lpReserved);
} /* LibMain */
#else//_WIN32
int FAR PASCAL libmain(
HANDLE hinst,
short cbHeapSize,
LPSTR lpszCmdLine)
{
if (cbHeapSize != 0)/* if DLL data segment is moveable */
UnlockData(0);
return 1;/* successful initialization */
}
#endif//_WIN32