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.

53 lines
1.0 KiB

  1. //
  2. // Copyright 1997 - Microsoft
  3. //
  4. //
  5. // CFACTORY.H - Class Factory Object
  6. //
  7. #ifndef _CFACTORY_H_
  8. #define _CFACTORY_H_
  9. //
  10. // QueryInterface Table
  11. //
  12. BEGIN_QITABLE( CFactory )
  13. DEFINE_QI( IID_IClassFactory, IClassFactory, 2 )
  14. END_QITABLE
  15. // CFactory
  16. class
  17. CFactory:
  18. public IClassFactory
  19. {
  20. private:
  21. // IUnknown
  22. ULONG _cRef;
  23. DECLARE_QITABLE( CFactory );
  24. // IClassFactory data
  25. LPCREATEINST _pfnCreateInstance;
  26. private: // Methods
  27. CFactory( LPCREATEINST lpfn );
  28. ~CFactory();
  29. STDMETHOD(Init)( );
  30. public: // Methods
  31. friend HRESULT CALLBACK
  32. DllGetClassObject( REFCLSID rclsid, REFIID riid, void** ppv );
  33. // IUnknown
  34. STDMETHOD(QueryInterface)( REFIID riid, LPVOID *ppv );
  35. STDMETHOD_(ULONG, AddRef)(void);
  36. STDMETHOD_(ULONG, Release)(void);
  37. // IClassFactory
  38. STDMETHOD(CreateInstance)( IUnknown *punkOuter, REFIID riid, LPVOID *ppv );
  39. STDMETHOD(LockServer)( BOOL fLock );
  40. };
  41. typedef CFactory* LPCFACTORY ;
  42. #endif // _CFACTORY_H_