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.
 
 
 
 
 
 

53 lines
2.3 KiB

//--------------------------------------------------------------------------
// Factory.h
//--------------------------------------------------------------------------
#pragma once
//--------------------------------------------------------------------------
// Forward Decls
//--------------------------------------------------------------------------
class CClassFactory;
//--------------------------------------------------------------------------
// Object Flags
//--------------------------------------------------------------------------
#define OIF_ALLOWAGGREGATION 0x0001
//--------------------------------------------------------------------------
// Object Creation Prototypes
//--------------------------------------------------------------------------
typedef HRESULT (APIENTRY *PFCREATEINSTANCE)(IUnknown *pUnkOuter, IUnknown **ppUnknown);
#define CreateObjectInstance (*m_pfCreateInstance)
//--------------------------------------------------------------------------
// ClassFactory
//--------------------------------------------------------------------------
class CClassFactory : public IClassFactory
{
public:
//----------------------------------------------------------------------
// Construction
//----------------------------------------------------------------------
CClassFactory(CLSID const *pclsid, DWORD dwFlags, PFCREATEINSTANCE pfCreateInstance);
//----------------------------------------------------------------------
// IUnknown members
//----------------------------------------------------------------------
STDMETHODIMP QueryInterface(REFIID, LPVOID *);
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
//----------------------------------------------------------------------
// IClassFactory members
//----------------------------------------------------------------------
STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID *);
STDMETHODIMP LockServer(BOOL);
public:
//----------------------------------------------------------------------
// Data
//----------------------------------------------------------------------
CLSID const *m_pclsid;
DWORD m_dwFlags;
PFCREATEINSTANCE m_pfCreateInstance;
};