Leaked source code of windows server 2003
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.
 
 
 
 
 
 

43 lines
956 B

//============================================================================
//
// CAutoLock.h -- Automatic locking class for mutexes and critical sections.
//
// Copyright (c) 1998-2002 Microsoft Corporation, All Rights Reserved
//
// Revisions: 6/26/98 a-kevhu Created
//
//============================================================================
#ifndef __CAUTOLOCK_H__
#define __CAUTOLOCK_H__
#include "CGlobal.h"
#include "CMutex.h"
#include "CCriticalSec.h"
class CAutoLock
{
private:
//HANDLE m_hMutexHandle;
//CMutex* m_pcMutex;
CCriticalSec* m_pcCritSec;
CStaticCritSec* m_psCritSec;
BOOL bExec ;
//CAutoLock( HANDLE hMutexHandle);
public:
// Constructors
//CAutoLock( CMutex& rCMutex);
CAutoLock( CCriticalSec& rCCriticalSec);
CAutoLock( CStaticCritSec & rCCriticalSec);
// Destructor
~CAutoLock();
BOOL Exec () ;
};
#endif