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.

50 lines
2.1 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. class CClassFactory; // Forward
  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. // --------------------------------------------------------------------------------
  18. // InetComm ClassFactory
  19. // --------------------------------------------------------------------------------
  20. class CClassFactory : public IClassFactory
  21. {
  22. public:
  23. CLSID const *m_pclsid;
  24. DWORD m_dwFlags;
  25. PFCREATEINSTANCE m_pfCreateInstance;
  26. // ----------------------------------------------------------------------------
  27. // Construction
  28. // ----------------------------------------------------------------------------
  29. CClassFactory(CLSID const *pclsid, DWORD dwFlags, PFCREATEINSTANCE pfCreateInstance);
  30. // ----------------------------------------------------------------------------
  31. // IUnknown members
  32. // ----------------------------------------------------------------------------
  33. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  34. STDMETHODIMP_(ULONG) AddRef(void);
  35. STDMETHODIMP_(ULONG) Release(void);
  36. // ----------------------------------------------------------------------------
  37. // IClassFactory members
  38. // ----------------------------------------------------------------------------
  39. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID *);
  40. STDMETHODIMP LockServer(BOOL);
  41. };
  42. #endif // __FACTORY_H