Leaked source code of windows server 2003
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.
 
 
 
 
 
 

89 lines
1.7 KiB

//***************************************************************************
//
// File:
//
// Module: MS SNMP Provider
//
// Purpose:
//
// Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
//
//***************************************************************************
#include "precomp.h"
#include <provexpt.h>
#include <snmptempl.h>
#include <snmpmt.h>
#include <process.h>
#include <objbase.h>
#include <snmpcont.h>
#include "snmpevt.h"
#include "snmpthrd.h"
#include "snmplog.h"
extern CRITICAL_SECTION g_SnmpDebugLogMapCriticalSection ;
//***************************************************************************
//
// LibMain32
//
// Purpose: Entry point for DLL. Good place for initialization.
// Return: TRUE if OK.
//***************************************************************************
BOOL APIENTRY DllMain (
HINSTANCE hInstance,
ULONG ulReason ,
LPVOID pvReserved
)
{
BOOL status = TRUE ;
SetStructuredExceptionHandler seh;
try
{
if ( DLL_PROCESS_DETACH == ulReason )
{
status = TRUE ;
}
else if ( DLL_PROCESS_ATTACH == ulReason )
{
status = TRUE ;
DisableThreadLibraryCalls(hInstance); // 158024
}
else if ( DLL_THREAD_DETACH == ulReason )
{
status = TRUE ;
}
else if ( DLL_THREAD_ATTACH == ulReason )
{
status = TRUE ;
}
}
catch(Structured_Exception e_SE)
{
status = FALSE;
}
catch(Heap_Exception e_HE)
{
status = FALSE;
}
catch(...)
{
status = FALSE;
}
return status ;
}