mirror of https://github.com/lianthony/NT4.0
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.
73 lines
2.0 KiB
73 lines
2.0 KiB
/***************************************************************************
|
|
**
|
|
** File: SAMPMAIN.C
|
|
** Purpose: DLL main routine
|
|
** Notes:
|
|
**
|
|
****************************************************************************/
|
|
|
|
#define SAMPMAIN_C
|
|
|
|
#include <windows.h>
|
|
#include "setupapi.h"
|
|
#include "cui.h"
|
|
|
|
#define Unused(arg) (void)(arg = arg) /* for compiler warnings */
|
|
|
|
|
|
int FAR PASCAL LibMain ( HINSTANCE hinst, WORD wDataSeg, WORD wHeapSize,
|
|
LPSTR lpszCmdLine );
|
|
int FAR PASCAL WEP ( int nParam );
|
|
|
|
|
|
/* Private Functions
|
|
*/
|
|
|
|
HINSTANCE hinstSamp = NULL;
|
|
|
|
/*
|
|
** Purpose:
|
|
** Initialization routine for DLL.
|
|
** Arguments:
|
|
** hinst: identifies the instance of the DLL.
|
|
** wDataSeg: specifies the value of the data segment (DS) register.
|
|
** wHeapSize: specifies the size of the heap defined in the
|
|
** module-definition file.
|
|
** lpszCmdLine: points to a null-terminated string specifying
|
|
** command-line information.
|
|
** Returns:
|
|
** 1 always
|
|
**
|
|
***************************************************************************/
|
|
int FAR PASCAL LibMain ( HINSTANCE hinst, WORD wDataSeg, WORD wHeapSize,
|
|
LPSTR lpszCmdLine )
|
|
{
|
|
Unused(hinst);
|
|
Unused(wDataSeg);
|
|
Unused(lpszCmdLine);
|
|
|
|
if (wHeapSize > 0)
|
|
UnlockData(0);
|
|
|
|
Assert(hinstSamp == NULL);
|
|
hinstSamp = hinst;
|
|
return (1);
|
|
}
|
|
|
|
|
|
/*
|
|
** Purpose:
|
|
** Exit routine for DLL.
|
|
** Arguments:
|
|
** nParam: indicates whether all of windows is shutting down
|
|
** or just the DLL.
|
|
** Returns:
|
|
** 1 always
|
|
**
|
|
***************************************************************************/
|
|
int FAR PASCAL WEP ( int nParam )
|
|
{
|
|
Unused(nParam);
|
|
|
|
return (1);
|
|
}
|