windows-nt/Source/XPSP1/NT/admin/wmi/wbem/scripting/error.h

62 lines
1.2 KiB
C
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
//***************************************************************************
//
// Copyright (c) 1998-1999 Microsoft Corporation
//
// error.h
//
// alanbos 29-Jun-98 Created.
//
// Error record handling object
//
//***************************************************************************
#ifndef _ERROR_H_
#define _ERROR_H_
//***************************************************************************
//
// CLASS NAME:
//
// CWbemErrorCache
//
// DESCRIPTION:
//
// Holds WBEM-style "last errors" on threads
//
//***************************************************************************
class CWbemErrorCache
{
private:
CRITICAL_SECTION m_cs;
typedef struct ThreadError
{
ThreadError *pNext;
ThreadError *pPrev;
DWORD dwThreadId;
COAUTHIDENTITY *pCoAuthIdentity;
BSTR strAuthority;
BSTR strPrincipal;
BSTR strNamespacePath;
IWbemServices *pService;
IWbemClassObject *pErrorObject;
} ThreadError;
ThreadError *headPtr;
public:
CWbemErrorCache ();
virtual ~CWbemErrorCache ();
CSWbemObject *GetAndResetCurrentThreadError ();
void SetCurrentThreadError (CSWbemServices *pService);
void ResetCurrentThreadError ();
};
#endif