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.4 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: mixedcf.hxx
  4. //
  5. // Contents: class factory object implementation for implementing
  6. // multiple classes in the same factory code.
  7. //
  8. // Classes: CMixedClassFactory
  9. //
  10. // History: 23-Nov-92 Rickhi Created
  11. //
  12. //--------------------------------------------------------------------
  13. #ifndef __CMIXEDCLASSFACTORY__
  14. #define __CMIXEDCLASSFACTORY__
  15. #include <win4p.hxx>
  16. #include <otrack.hxx> // object tracking
  17. //+-------------------------------------------------------------------
  18. //
  19. // Class: CMixedClassFactory
  20. //
  21. // Purpose: test class factory object implementation
  22. //
  23. // History: 23-Nov-92 Rickhi Created
  24. //
  25. //--------------------------------------------------------------------
  26. class CMixedClassFactory : INHERIT_TRACKING,
  27. public IClassFactory
  28. {
  29. public:
  30. // Constructor & Destructor
  31. CMixedClassFactory(REFCLSID rclsid);
  32. // IUnknown methods
  33. STDMETHOD(QueryInterface)(REFIID riid, void **ppUnk);
  34. DECLARE_STD_REFCOUNTING;
  35. // IClassFactory methods
  36. STDMETHOD(CreateInstance)(IUnknown *punkOuter,
  37. REFIID riid,
  38. void **ppunkObject);
  39. STDMETHOD(LockServer)(BOOL fLock);
  40. private:
  41. ~CMixedClassFactory(void);
  42. CLSID _clsid;
  43. };
  44. #endif // __CMIXEDCLASSFACTORY__