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.

38 lines
1.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // File: verify.hxx
  4. //
  5. // Synopsis: Various verification functions
  6. //
  7. // History: 28-Jun-95 MikeW Created
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _VERIFY_HXX_
  11. #define _VERIFY_HXX_
  12. //
  13. // BOGUS_INTERFACE is a non-NULL pointer but illegal that can be used to
  14. // initialize interface pointers. It is useful for checking to see if a call
  15. // properly set the out param to NULL on an error
  16. //
  17. #define BOGUS_INTERFACE ((IUnknown *) 1)
  18. //
  19. // Misc. prototypes
  20. //
  21. void ReleaseInterface(LPUNKNOWN *ppUnknown);
  22. HRESULT GetInterface(IUnknown *pObject, REFIID riid, PVOID *ppInterface);
  23. HRESULT VerifyResult(HRESULT hrCheck, HRESULT hrExpected);
  24. BOOL VerifyInterfaceExists(IUnknown *pObject, IID iid);
  25. BOOL VerifyInterfaceDoesntExist(IUnknown *pObject, IID iid);
  26. BOOL VerifyObjectIdentity(IUnknown *pObject, IID iid);
  27. HRESULT VerifyResultAndPointer(
  28. HRESULT hrCheck,
  29. HRESULT hrExpected,
  30. void *pUnknown);
  31. #endif // _VERIFY_HXX_