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.
 
 
 
 
 
 

55 lines
1.4 KiB

///////////////////////////////////////////////////////////////////////////
//
// Copyright(C) 1998-1999 Microsoft Corporation all rights reserved.
//
// Module: sa_atl.h
//
// Project: Chameleon
//
// Description: Helper classes the require ATL
//
// Log:
//
// When Who What
// ---- --- ----
// 12/03/98 TLP Initial Version
//
///////////////////////////////////////////////////////////////////////////////
#ifndef __INC_SA_ATL_H_
#define __INC_SA_ATL_H_
///////////////////////////////////////////////////////////////////////////////////////
// 1) Critical section class
///////////////////////////////////////////////////////////////////////////////////////
class CLockIt
{
public:
CLockIt(CComObjectRootEx<CComMultiThreadModel>& T) throw()
: m_theLock(T)
{ m_theLock.Lock(); }
~CLockIt() throw()
{ m_theLock.Unlock(); }
protected:
CComObjectRootEx<CComMultiThreadModel>& m_theLock;
};
///////////////////////////////////////////////////////////////////////////////////////
// 2) Enum VARIANT class
///////////////////////////////////////////////////////////////////////////////////////
typedef CComEnum< IEnumVARIANT,
&__uuidof(IEnumVARIANT),
VARIANT,
_Copy<VARIANT>,
CComSingleThreadModel
> EnumVARIANT;
#endif // __INC_SA_ATL_H