windows-nt/Source/XPSP1/NT/ds/security/cryptoapi/common/pkiutil/pkicrit.cpp
2020-09-26 16:20:57 +08:00

33 lines
795 B
C++

//+-------------------------------------------------------------------------
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1995 - 1999
//
// File: pkicrit.cpp
//
// Contents: PKI CriticalSection Functions
//
// Functions: Pki_InitializeCriticalSection
//
// History: 23-Aug-99 philh created
//--------------------------------------------------------------------------
#include "global.hxx"
BOOL
WINAPI
Pki_InitializeCriticalSection(
OUT LPCRITICAL_SECTION lpCriticalSection
)
{
__try {
InitializeCriticalSection(lpCriticalSection);
} __except(EXCEPTION_EXECUTE_HANDLER) {
memset(lpCriticalSection, 0, sizeof(*lpCriticalSection));
SetLastError(GetExceptionCode());
return FALSE;
}
return TRUE;
}