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.

62 lines
2.8 KiB

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