Source code of Windows XP (NT5)
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.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: cqi.hxx
  7. //
  8. // Contents: Class to answer YES to any QueryInterface call.
  9. //
  10. // Classes: CQI
  11. //
  12. // History: 06-Aug-92 Rickhi Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef __CQI__
  16. #define __CQI__
  17. #include <otrack.hxx>
  18. extern "C" const GUID CLSID_QI;
  19. extern "C" const GUID CLSID_QIHANDLER;
  20. //+-------------------------------------------------------------------------
  21. //
  22. // Class: CQI
  23. //
  24. // Purpose: Class to answer YES to many QueryInterface calls.
  25. // It's behavior differ's slightly depending on what class it
  26. // is acting as. It may or may not know IStdMarshalInfo.
  27. //
  28. // Interface: QueryInterface
  29. // AddRef
  30. // Release
  31. // GetUnmarshalClass
  32. //
  33. // History: 06-Aug-92 Rickhi Created
  34. //
  35. //--------------------------------------------------------------------------
  36. class CQI : INHERIT_TRACKING,
  37. public IStdMarshalInfo
  38. {
  39. public:
  40. CQI(REFCLSID rclsid);
  41. STDMETHOD(QueryInterface)(REFIID riid, void **ppunk);
  42. DECLARE_STD_REFCOUNTING;
  43. STDMETHOD(GetClassForHandler)(DWORD dwDestContext,
  44. void *pvDestContext,
  45. CLSID *pClsid);
  46. private:
  47. ~CQI(void);
  48. CLSID _clsid;
  49. };
  50. #endif // __CQI__