windows-nt/Source/XPSP1/NT/ds/security/cryptoapi/common/pkiutil/pkicrit.cpp

33 lines
795 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
//+-------------------------------------------------------------------------
// 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;
}