ReactOS  0.4.12-dev-18-gf469aca
anonymous_namespace{mstscax.cpp}::ClassFactory Class Reference
Inheritance diagram for anonymous_namespace{mstscax.cpp}::ClassFactory:
Collaboration diagram for anonymous_namespace{mstscax.cpp}::ClassFactory:

Public Member Functions

 ClassFactory (IUnknown *pUnknwn)
 
 ~ClassFactory ()
 
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID riid, void **ppvObject)
 
virtual ULONG STDMETHODCALLTYPE AddRef (void)
 
virtual ULONG STDMETHODCALLTYPE Release (void)
 
virtual HRESULT STDMETHODCALLTYPE CreateInstance (IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
 
virtual HRESULT STDMETHODCALLTYPE LockServer (BOOL fLock)
 
virtual HRESULT STDMETHODCALLTYPE GetLicInfo (LICINFO *pLicInfo)
 
virtual HRESULT STDMETHODCALLTYPE RequestLicKey (DWORD dwReserved, BSTR *pBstrKey)
 
virtual HRESULT STDMETHODCALLTYPE CreateInstanceLic (IUnknown *pUnkOuter, IUnknown *pUnkReserved, REFIID riid, BSTR bstrKey, PVOID *ppvObj)
 
- Public Member Functions inherited from IClassFactory2
HRESULT RemoteCreateInstanceLic ([in] REFIID riid, [in] BSTR bstrKey, [out, iid_is(riid)] IUnknown **ppvObj)
 
- Public Member Functions inherited from IClassFactory
HRESULT RemoteCreateInstance ([in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
HRESULT RemoteLockServer ([in] BOOL fLock)
 

Private Member Functions

IClassFactorygetIClassFactory ()
 
IClassFactory2getIClassFactory2 ()
 

Private Attributes

LONG m_refCount
 
IUnknownm_IUnknown
 
IClassFactorym_IClassFactory
 
IClassFactory2m_IClassFactory2
 

Additional Inherited Members

- Public Types inherited from IClassFactory2
typedef IClassFactory2LPCLASSFACTORY2
 
typedef struct IClassFactory2::tagLICINFO LICINFO
 
typedef struct IClassFactory2::tagLICINFOLPLICINFO
 
- Public Types inherited from IClassFactory
typedef IClassFactoryLPCLASSFACTORY
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 4768 of file mstscax.cpp.

Constructor & Destructor Documentation

◆ ClassFactory()

anonymous_namespace{mstscax.cpp}::ClassFactory::ClassFactory ( IUnknown pUnknwn)
inline

Definition at line 4804 of file mstscax.cpp.

4804  :
4805  m_refCount(1),
4806  m_IUnknown(pUnknwn),
4809  {
4810  m_IUnknown->AddRef();
4811  }
smooth NULL
Definition: ftsmooth.c:416
ULONG AddRef()

◆ ~ClassFactory()

anonymous_namespace{mstscax.cpp}::ClassFactory::~ClassFactory ( )
inline

Definition at line 4813 of file mstscax.cpp.

4814  {
4815  if(m_IUnknown)
4816  m_IUnknown->Release();
4817 
4818  if(m_IClassFactory)
4820 
4821  if(m_IClassFactory2)
4823  }
ULONG Release()

Member Function Documentation

◆ AddRef()

virtual ULONG STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::AddRef ( void  )
inlinevirtual

Implements IUnknown.

Definition at line 4890 of file mstscax.cpp.

4891  {
4893  }
#define InterlockedIncrement
Definition: armddk.h:53

◆ CreateInstance()

virtual HRESULT STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::CreateInstance ( IUnknown pUnkOuter,
REFIID  riid,
void **  ppvObject 
)
inlinevirtual

Implements IClassFactory.

Definition at line 4907 of file mstscax.cpp.

4908  {
4909  IClassFactory * pIClassFactory = getIClassFactory();
4910  dbgprintf(TEXT("IClassFactory::CreateInstance(%p, %ls, %p)"), pUnkOuter, UUIDToString(riid).c_str(), ppvObject);
4911  HRESULT hr = pIClassFactory->CreateInstance(NULL, riid, ppvObject);
4912  dbgprintf(TEXT("IClassFactory::CreateInstance -> %08X, pvObject = %p"), hr, *ppvObject);
4913  return CoClass::CreateInstance((IUnknown *)*ppvObject, pUnkOuter, riid, ppvObject);
4914  }
REFIID riid
Definition: precomp.h:44
static HRESULT CreateInstance(IUnknown *pUnknw, IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
Definition: mstscax.cpp:2849
HRESULT CreateInstance([in, unique] IUnknown *pUnkOuter, [in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
smooth NULL
Definition: ftsmooth.c:416
std::wstring UUIDToString(const UUID &uuid)
Definition: mstscax.cpp:110
LONG HRESULT
Definition: typedefs.h:77
#define TEXT(s)
Definition: k32.h:26
void dbgprintf(LPCTSTR fmt,...)
Definition: mstscax.cpp:42

◆ CreateInstanceLic()

virtual HRESULT STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::CreateInstanceLic ( IUnknown pUnkOuter,
IUnknown pUnkReserved,
REFIID  riid,
BSTR  bstrKey,
PVOID ppvObj 
)
inlinevirtual

Implements IClassFactory2.

Definition at line 4945 of file mstscax.cpp.

4946  {
4947  IClassFactory2 * pIClassFactory2 = getIClassFactory2();
4948  dbgprintf(TEXT("IClassFactory2::CreateInstanceLic(%p, %p, %ls, %ls, %p)"), pUnkOuter, pUnkReserved, UUIDToString(riid).c_str(), bstrKey, ppvObj);
4949  HRESULT hr = pIClassFactory2->CreateInstanceLic(NULL, pUnkReserved, riid, bstrKey, ppvObj);
4950  dbgprintf(TEXT("IClassFactory2::CreateInstanceLic -> %08X, pvObj = %p"), hr, *ppvObj);
4951  return CoClass::CreateInstance((IUnknown *)*ppvObj, pUnkOuter, riid, ppvObj);
4952  }
REFIID riid
Definition: precomp.h:44
static HRESULT CreateInstance(IUnknown *pUnknw, IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
Definition: mstscax.cpp:2849
smooth NULL
Definition: ftsmooth.c:416
std::wstring UUIDToString(const UUID &uuid)
Definition: mstscax.cpp:110
LONG HRESULT
Definition: typedefs.h:77
HRESULT CreateInstanceLic([in] IUnknown *pUnkOuter, [in] IUnknown *pUnkReserved, [in] REFIID riid, [in] BSTR bstrKey, [out, iid_is(riid)] PVOID *ppvObj)
#define TEXT(s)
Definition: k32.h:26
void dbgprintf(LPCTSTR fmt,...)
Definition: mstscax.cpp:42

◆ getIClassFactory()

IClassFactory* anonymous_namespace{mstscax.cpp}::ClassFactory::getIClassFactory ( )
inlineprivate

Definition at line 4776 of file mstscax.cpp.

4777  {
4778  if(m_IClassFactory)
4779  return m_IClassFactory;
4780 
4781  if(m_IClassFactory2)
4783 
4784  if(m_IClassFactory)
4785  {
4787  return m_IClassFactory;
4788  }
4789 
4791  return m_IClassFactory;
4792  }
ULONG AddRef()
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ getIClassFactory2()

IClassFactory2* anonymous_namespace{mstscax.cpp}::ClassFactory::getIClassFactory2 ( )
inlineprivate

Definition at line 4794 of file mstscax.cpp.

4795  {
4796  if(m_IClassFactory2)
4797  return m_IClassFactory2;
4798 
4800  return m_IClassFactory2;
4801  }
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ GetLicInfo()

virtual HRESULT STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::GetLicInfo ( LICINFO pLicInfo)
inlinevirtual

Implements IClassFactory2.

Definition at line 4927 of file mstscax.cpp.

4928  {
4929  IClassFactory2 * pIClassFactory2 = getIClassFactory2();
4930  dbgprintf(TEXT("IClassFactory2::GetLicInfo(%p)"), pLicInfo);
4931  HRESULT hr = pIClassFactory2->GetLicInfo(pLicInfo);
4932  dbgprintf(TEXT("IClassFactory2::GetLicInfo -> %08X, LicInfo = %p"), hr, pLicInfo);
4933  return hr;
4934  }
HRESULT GetLicInfo([out] LICINFO *pLicInfo)
LONG HRESULT
Definition: typedefs.h:77
#define TEXT(s)
Definition: k32.h:26
void dbgprintf(LPCTSTR fmt,...)
Definition: mstscax.cpp:42

◆ LockServer()

virtual HRESULT STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::LockServer ( BOOL  fLock)
inlinevirtual

Implements IClassFactory.

Definition at line 4916 of file mstscax.cpp.

4917  {
4918  IClassFactory * pIClassFactory = getIClassFactory();
4919  dbgprintf(TEXT("IClassFactory::LockServer(%s)"), BooleanToString(fLock));
4920  HRESULT hr = pIClassFactory->LockServer(fLock);
4921  dbgprintf(TEXT("IClassFactory::LockServer -> %08X"), hr);
4922  return hr;
4923  }
LONG HRESULT
Definition: typedefs.h:77
LPCTSTR BooleanToString(const T &X)
Definition: mstscax.cpp:164
#define TEXT(s)
Definition: k32.h:26
HRESULT LockServer([in] BOOL fLock)
void dbgprintf(LPCTSTR fmt,...)
Definition: mstscax.cpp:42

◆ QueryInterface()

virtual HRESULT STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::QueryInterface ( REFIID  riid,
void **  ppvObject 
)
inlinevirtual

Implements IUnknown.

Definition at line 4827 of file mstscax.cpp.

4828  {
4829  HRESULT hr;
4830  IUnknown * pvObject = NULL;
4831 
4832  dbgprintf(TEXT("IUnknown::QueryInterface(%ls, %p)"), UUIDToString(riid).c_str(), ppvObject);
4833 
4834 #define QIBEGIN() \
4835  if(riid == IID_IUnknown) \
4836  { \
4837  hr = S_OK; \
4838  pvObject = (IUnknown *)(this); \
4839  }
4840 
4841 #define QI(I) \
4842  else if(riid == IID_ ## I) \
4843  { \
4844  if(m_ ## I) \
4845  { \
4846  m_ ## I->AddRef(); \
4847  hr = S_OK; \
4848  } \
4849  else \
4850  { \
4851  hr = m_IUnknown->QueryInterface(&m_ ## I); \
4852  } \
4853  \
4854  if(SUCCEEDED(hr)) \
4855  pvObject = static_cast<I *>(this); \
4856  }
4857 
4858 #define QIEND() \
4859  else \
4860  { \
4861  hr = E_NOINTERFACE; \
4862  pvObject = NULL; \
4863  }
4864 
4865  QIBEGIN()
4866  QI(IClassFactory)
4868  QIEND()
4869 
4870 #undef QIBEGIN
4871 #undef QIEND
4872 #undef QI
4873 
4874  if(SUCCEEDED(hr))
4875  {
4876  assert(pvObject);
4877  pvObject->AddRef();
4878  }
4879  else
4880  {
4881  assert(pvObject == NULL);
4882  }
4883 
4884  *ppvObject = pvObject;
4885 
4886  dbgprintf(TEXT("IUnknown::QueryInterface -> %08X, ppvObject = %p"), hr, *ppvObject);
4887  return hr;
4888  }
#define QIEND()
REFIID riid
Definition: precomp.h:44
#define assert(x)
Definition: debug.h:53
smooth NULL
Definition: ftsmooth.c:416
std::wstring UUIDToString(const UUID &uuid)
Definition: mstscax.cpp:110
#define QI(I)
LONG HRESULT
Definition: typedefs.h:77
ULONG AddRef()
#define QIBEGIN()
#define TEXT(s)
Definition: k32.h:26
void dbgprintf(LPCTSTR fmt,...)
Definition: mstscax.cpp:42
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ Release()

virtual ULONG STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::Release ( void  )
inlinevirtual

Implements IUnknown.

Definition at line 4895 of file mstscax.cpp.

4896  {
4898 
4899  if(n == 0)
4900  delete this;
4901 
4902  return n;
4903  }
GLuint n
Definition: s_context.h:57
long LONG
Definition: pedump.c:60
#define InterlockedDecrement
Definition: armddk.h:52

◆ RequestLicKey()

virtual HRESULT STDMETHODCALLTYPE anonymous_namespace{mstscax.cpp}::ClassFactory::RequestLicKey ( DWORD  dwReserved,
BSTR pBstrKey 
)
inlinevirtual

Implements IClassFactory2.

Definition at line 4936 of file mstscax.cpp.

4937  {
4938  IClassFactory2 * pIClassFactory2 = getIClassFactory2();
4939  dbgprintf(TEXT("IClassFactory2::RequestLicKey(%lu, %p)"), dwReserved, pBstrKey);
4940  HRESULT hr = pIClassFactory2->RequestLicKey(dwReserved, pBstrKey);
4941  dbgprintf(TEXT("IClassFactory2::RequestLicKey -> %08X, bstrKey = %ls"), hr, *pBstrKey);
4942  return hr;
4943  }
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
LONG HRESULT
Definition: typedefs.h:77
HRESULT RequestLicKey([in] DWORD dwReserved, [out] BSTR *pBstrKey)
#define TEXT(s)
Definition: k32.h:26
void dbgprintf(LPCTSTR fmt,...)
Definition: mstscax.cpp:42

Member Data Documentation

◆ m_IClassFactory

IClassFactory* anonymous_namespace{mstscax.cpp}::ClassFactory::m_IClassFactory
private

Definition at line 4773 of file mstscax.cpp.

◆ m_IClassFactory2

IClassFactory2* anonymous_namespace{mstscax.cpp}::ClassFactory::m_IClassFactory2
private

Definition at line 4774 of file mstscax.cpp.

◆ m_IUnknown

IUnknown* anonymous_namespace{mstscax.cpp}::ClassFactory::m_IUnknown
private

Definition at line 4772 of file mstscax.cpp.

◆ m_refCount

LONG anonymous_namespace{mstscax.cpp}::ClassFactory::m_refCount
private

Definition at line 4771 of file mstscax.cpp.


The documentation for this class was generated from the following file: