inspectable.idl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. import "wtypes.idl";
  7. import "hstring.idl";
  8. import "unknwn.idl";
  9. typedef enum TrustLevel {
  10. BaseTrust = 0,
  11. PartialTrust = 1,
  12. FullTrust = 2
  13. } TrustLevel;
  14. [
  15. object,
  16. uuid(af86e2e0-b12d-4c6a-9c5a-d7aa65101e90),
  17. pointer_default(unique)
  18. ]
  19. interface IInspectable : IUnknown
  20. {
  21. HRESULT GetIids(
  22. [out] ULONG *iidCount,
  23. [out, size_is(*iidCount)] IID **iids);
  24. HRESULT GetRuntimeClassName(
  25. [out] HSTRING *className);
  26. HRESULT GetTrustLevel(
  27. [out] TrustLevel *trustLevel);
  28. }
  29. cpp_quote("")
  30. cpp_quote("#if !defined (CINTERFACE) && defined (__cplusplus)")
  31. cpp_quote("extern \"C++\" {")
  32. cpp_quote(" template<typename T> void **IID_INS_ARGS_internal (T **p) {")
  33. cpp_quote(" static_cast<IInspectable *> (*p);")
  34. cpp_quote(" return reinterpret_cast<void **> (p);")
  35. cpp_quote(" }")
  36. cpp_quote("}")
  37. cpp_quote("")
  38. cpp_quote("#define IID_INS_ARGS(P) __uuidof(**(P)), IID_INS_ARGS_internal(P)")
  39. cpp_quote("#endif")