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.
|
|
//*******************************************************************************************
//
// Filename : ThisDll.h
//
// Generic OLE header file
//
// Copyright (c) 1994 - 1996 Microsoft Corporation. All rights reserved
//
//*******************************************************************************************
#ifndef _THISDLL_H_
#define _THISDLL_H_
class CWaitCursor { public: CWaitCursor() {m_cOld=SetCursor(LoadCursor(NULL, IDC_WAIT));} ~CWaitCursor() {SetCursor(m_cOld);}
private: HCURSOR m_cOld; } ;
class CRefCount { public: CRefCount() : m_cRef(0) {};
UINT AddRef() {return(++m_cRef);} UINT Release() {return(--m_cRef);} UINT GetRef() {return( m_cRef);}
private: UINT m_cRef;
} ;
class CThisDll { public: CThisDll() { m_hInst=NULL; } // Make no destructor for global classes (requires CRT stuff)
void SetInstance(HINSTANCE hInst) {m_hInst=hInst;} HINSTANCE GetInstance() {return(m_hInst);}
CRefCount m_cRef; CRefCount m_cLock;
private: HINSTANCE m_hInst; } ;
extern CThisDll g_ThisDll;
class CRefDll { public: CRefDll() {g_ThisDll.m_cRef.AddRef ();} ~CRefDll() {g_ThisDll.m_cRef.Release();} } ;
extern HRESULT CabFolder_CreateInstance(REFIID riid, LPVOID *ppvObj); extern HRESULT CabViewDataObject_CreateInstance(REFIID riid, LPVOID *ppvObj);
#endif // _THISDLL_H_
|