INIT.C

/*++ 

Copyright 1993 - 1998 Microsoft Corporation

Module Name:

init.c

Abstract:

NT LM Security Support Provider client side initialization.

Author:

Cliff Van Dyke (CliffV) 29-Jun-1993

Environment: User Mode

Revision History:

--*/


#include <sampssp.h>

CRITICAL_SECTION DllCritSect; // Serializes access to all globals in module


BOOLEAN
DllInit(
IN PVOID DllHandle,
IN ULONG Reason,
IN PCONTEXT Context OPTIONAL
)

/*++

Routine Description:

This is the Dll initialization routine for ntlmssp.dll

Arguments:

Standard.

Return Status:

TRUE: if initialization succeeded

--*/

{

//
// On process attach,
// initialize the critical section,
// defer any additional initialization.
//

switch (Reason) {
case DLL_PROCESS_ATTACH:
_asm int 3
InitializeCriticalSection( &DllCritSect );
break;

//
// Handle process detach.
//

case DLL_PROCESS_DETACH:


//
// Shutdown the common routines.
//

EnterCriticalSection( &DllCritSect );
LeaveCriticalSection( &DllCritSect );

//
// Finally, Delete the critical section
//

DeleteCriticalSection( &DllCritSect );

break;

}

return TRUE;
UNREFERENCED_PARAMETER( Context );
UNREFERENCED_PARAMETER( DllHandle );

}