/***************************************************************************
*
* Function Name: DllMain
* Purpose: service entrance
* Input:
hinstDLL: Handle to the DLL.
dwReason: Specifies a flag indicating why the DLL entry-point function is being called.
lpvReserved: Specifies further aspects of DLL initialization and cleanup.
* Output:none
* Return:TRUE
***************************************************************************/
BOOL APIENTRY DllMain( HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{
switch( dwReason )
{
case DLL_PROCESS_ATTACH:
g_hInst=(HINSTANCE)hinstDLL;
break;
case DLL_PROCESS_DETACH:
{
//..
break;
}
}
return TRUE;
}
/***************************************************************************
*
* Function Name:xxx_Close
* Purpose: This function is implemented by a service and will be called by Services.exe.
* Input:
dwData:Specifies the value returned by xxx_Open (Services.exe) for the given service instance.
* Output:none
* Return:TRUE indicates success. FALSE indicates failure. * Remarks:This function is called when a service instance is closing during an application's call to CloseHandle.
***************************************************************************/
BOOL xxx_Close(DWORD dwData)
{
//..
//return FALSE;
}