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.

46 lines
992 B

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: unknown.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _unknown_h
  11. #define _unknown_h
  12. // Global count of number of active objects
  13. extern LONG g_cRefCount;
  14. #define GLOBAL_REFCOUNT (g_cRefCount)
  15. // CUnknown
  16. typedef struct
  17. {
  18. const IID* piid; // interface ID
  19. LPVOID pvObject; // pointer to the object
  20. } INTERFACES, * LPINTERFACES;
  21. class CUnknown
  22. {
  23. protected:
  24. LONG m_cRefCount;
  25. public:
  26. CUnknown();
  27. STDMETHODIMP HandleQueryInterface(REFIID riid, LPVOID* ppvObject, LPINTERFACES aInterfaces, int cif);
  28. STDMETHODIMP_(ULONG) HandleAddRef();
  29. STDMETHODIMP_(ULONG) HandleRelease();
  30. protected:
  31. virtual ~CUnknown();
  32. };
  33. #endif