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.

52 lines
2.2 KiB

  1. //----------------------------------------------------------------------
  2. // Factory.h
  3. //----------------------------------------------------------------------
  4. #pragma once
  5. //----------------------------------------------------------------------
  6. // Forward Decls
  7. //----------------------------------------------------------------------
  8. class CClassFactory;
  9. //----------------------------------------------------------------------
  10. // Object Flags
  11. //----------------------------------------------------------------------
  12. #define OIF_ALLOWAGGREGATION 0x0001
  13. //----------------------------------------------------------------------
  14. // Object Creation Prototypes
  15. //----------------------------------------------------------------------
  16. typedef HRESULT (APIENTRY *PFCREATEINSTANCE)(IUnknown *pUnkOuter, IUnknown **ppUnknown);
  17. #define CreateObjectInstance (*m_pfCreateInstance)
  18. //----------------------------------------------------------------------
  19. // InetComm ClassFactory
  20. //----------------------------------------------------------------------
  21. class CClassFactory : public IClassFactory
  22. {
  23. public:
  24. //----------------------------------------------------------------------
  25. // Public Data
  26. //----------------------------------------------------------------------
  27. CLSID const *m_pclsid;
  28. DWORD m_dwFlags;
  29. PFCREATEINSTANCE m_pfCreateInstance;
  30. //----------------------------------------------------------------------
  31. // Construction
  32. //----------------------------------------------------------------------
  33. CClassFactory(CLSID const *pclsid, DWORD dwFlags, PFCREATEINSTANCE pfCreateInstance);
  34. //----------------------------------------------------------------------
  35. // IUnknown members
  36. //----------------------------------------------------------------------
  37. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  38. STDMETHODIMP_(ULONG) AddRef(void);
  39. STDMETHODIMP_(ULONG) Release(void);
  40. //----------------------------------------------------------------------
  41. // IClassFactory members
  42. //----------------------------------------------------------------------
  43. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID *);
  44. STDMETHODIMP LockServer(BOOL);
  45. };