Source code of Windows XP (NT5)
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.

35 lines
819 B

  1. #ifndef _factory_h
  2. #define _factory_h
  3. typedef HRESULT (* CREATEPROC)(IUnknown *, IUnknown **);
  4. #define FD_ALLOWAGGREGATION 0x00000001
  5. struct CFactoryData
  6. {
  7. CLSID const *m_pClsid;
  8. CREATEPROC m_pCreateProc;
  9. DWORD m_dwFlags;
  10. };
  11. class CClassFactory : public IClassFactory
  12. {
  13. public:
  14. CClassFactory(const CFactoryData *pFactoryData);
  15. ~CClassFactory();
  16. // IUnknown members
  17. STDMETHODIMP QueryInterface(REFIID riid, void **ppv);
  18. STDMETHODIMP_(ULONG) AddRef();
  19. STDMETHODIMP_(ULONG) Release();
  20. // IClassFactory members
  21. STDMETHODIMP CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppvObj);
  22. STDMETHODIMP LockServer(BOOL fLock);
  23. private:
  24. ULONG m_cRef;
  25. const CFactoryData *m_pFactoryData;
  26. };
  27. #endif // _factory_h