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.
29 lines
400 B
29 lines
400 B
#ifndef __WMIGUARD_H__
|
|
#define __WMIGUARD_H__
|
|
|
|
/*
|
|
* Class:
|
|
*
|
|
* WmiGuard
|
|
*
|
|
*/
|
|
|
|
class WmiGuard
|
|
{
|
|
private:
|
|
|
|
CCriticalSection* m_pCS ;
|
|
|
|
public:
|
|
|
|
HRESULT TryEnter () ;
|
|
HRESULT Enter () ;
|
|
HRESULT Leave () ;
|
|
|
|
WmiGuard () ;
|
|
~WmiGuard () ;
|
|
|
|
BOOL Init ( CCriticalSection* pCS ) { return ( pCS == NULL ) ? FALSE : ( m_pCS = pCS ), TRUE; } ;
|
|
} ;
|
|
|
|
#endif __WMIGUARD_H__
|