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.

59 lines
1.8 KiB

  1. //**********************************************************************
  2. // File name: factory.h
  3. //
  4. //
  5. // Copyright (c) 1993-1996 Microsoft Corporation. All rights reserved.
  6. //**********************************************************************
  7. #if !defined(FACTORY_H)
  8. #define FACTORY_H
  9. #ifdef __cplusplus
  10. /**********************************************************************
  11. ObjectClass: ClassFactory
  12. Summary:
  13. Interfaces: IUnknown
  14. Standard interface providing COM object features.
  15. IClassFactory
  16. Standard interface providing COM Class Factory features.
  17. Aggregation:
  18. **********************************************************************/
  19. class ClassFactory : public IClassFactory
  20. {
  21. public:
  22. // Main Object Constructor & Destructor.
  23. ClassFactory(CServer* pServer, CLSID const *);
  24. ~ClassFactory(void);
  25. // IUnknown methods. Main object, non-delegating.
  26. virtual STDMETHODIMP QueryInterface(REFIID, void **);
  27. virtual STDMETHODIMP_(ULONG) AddRef(void);
  28. virtual STDMETHODIMP_(ULONG) Release(void);
  29. // Interface IClassFactory
  30. virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter,
  31. const IID& iid,
  32. void** ppv);
  33. virtual STDMETHODIMP LockServer(BOOL bLock);
  34. private:
  35. // Main Object reference count.
  36. LONG m_cRefs;
  37. // Pointer to this component server's control object.
  38. CServer* m_pServer;
  39. // CLSID of the COM object to create
  40. CLSID const* m_pclsid;
  41. };
  42. typedef ClassFactory* PClassFactory;
  43. #endif // __cplusplus
  44. #endif // FACTORY_H