servprov.idl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. cpp_quote("/**")
  2. cpp_quote(" * This file is part of the mingw-w64 runtime package.")
  3. cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
  4. cpp_quote(" */")
  5. cpp_quote("")
  6. cpp_quote("#include <winapifamily.h>")
  7. cpp_quote("")
  8. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  9. cpp_quote("")
  10. import "objidl.idl";
  11. cpp_quote("")
  12. interface IServiceProvider;
  13. cpp_quote("")
  14. [object, uuid (6d5140c1-7436-11ce-8034-00aa006009fa), pointer_default (unique)]
  15. interface IServiceProvider : IUnknown {
  16. typedef [unique] IServiceProvider *LPSERVICEPROVIDER;
  17. cpp_quote("#if defined(__cplusplus) && !defined(CINTERFACE)")
  18. cpp_quote("EXTERN_C const IID IID_IServiceProvider;")
  19. cpp_quote("extern \"C++\" {")
  20. cpp_quote("MIDL_INTERFACE(\"6d5140c1-7436-11ce-8034-00aa006009fa\")")
  21. cpp_quote("IServiceProvider : public IUnknown {")
  22. cpp_quote("public:")
  23. cpp_quote("virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject) = 0;")
  24. cpp_quote("")
  25. cpp_quote("template <class Q>")
  26. cpp_quote("HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, Q **pp) {")
  27. cpp_quote(" return QueryService(guidService, __uuidof(Q), (void **)pp);")
  28. cpp_quote("}")
  29. cpp_quote("};")
  30. cpp_quote("}")
  31. cpp_quote("")
  32. cpp_quote("HRESULT STDMETHODCALLTYPE IServiceProvider_RemoteQueryService_Proxy(IServiceProvider *This, REFGUID guidService, REFIID riid, IUnknown **ppvObject);")
  33. cpp_quote("void __RPC_STUB IServiceProvider_RemoteQueryService_Stub(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase);")
  34. cpp_quote("#ifdef __CRT_UUID_DECL")
  35. cpp_quote("__CRT_UUID_DECL(IServiceProvider, 0x6d5140c1, 0x7436, 0x11ce, 0x80,0x34, 0x00,0xaa,0x00,0x60,0x09,0xfa)")
  36. cpp_quote("#endif")
  37. cpp_quote("#else")
  38. [local] HRESULT QueryService ([in] REFGUID guidService,[in] REFIID riid,[out] void **ppvObject);
  39. [call_as (QueryService)] HRESULT RemoteQueryService ([in] REFGUID guidService,[in] REFIID riid,[out, iid_is (riid)] IUnknown **ppvObject);
  40. }
  41. cpp_quote("#endif")
  42. cpp_quote("")
  43. cpp_quote("#endif")