1cpp_quote("/**") 2cpp_quote(" * This file is part of the mingw-w64 runtime package.") 3cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.") 4cpp_quote(" */") 5cpp_quote("") 6cpp_quote("#include <winapifamily.h>") 7 8#if !defined (BUILDING_UNKNWN_IDL) && !defined (DO_NO_IMPORTS) 9cpp_quote("") 10import "wtypesbase.idl"; 11#endif 12 13cpp_quote("") 14cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)") 15[local, object, uuid (00000000-0000-0000-C000-000000000046), pointer_default (unique)] 16interface IUnknown { 17 typedef [unique] IUnknown *LPUNKNOWN; 18 cpp_quote("") 19 cpp_quote("#if defined(__cplusplus) && !defined(CINTERFACE)") 20 cpp_quote("EXTERN_C const IID IID_IUnknown;") 21 cpp_quote("") 22 cpp_quote("extern \"C++\" {") 23 cpp_quote(" MIDL_INTERFACE(\"00000000-0000-0000-C000-000000000046\")") 24 cpp_quote(" IUnknown {") 25 cpp_quote(" public:") 26 cpp_quote(" BEGIN_INTERFACE") 27 cpp_quote(" virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) = 0;") 28 cpp_quote(" virtual ULONG STDMETHODCALLTYPE AddRef(void) = 0;") 29 cpp_quote(" virtual ULONG STDMETHODCALLTYPE Release(void) = 0;") 30 cpp_quote("") 31 cpp_quote(" template<class Q>") 32 cpp_quote(" HRESULT STDMETHODCALLTYPE QueryInterface(Q **pp) {") 33 cpp_quote(" return QueryInterface(__uuidof(Q), (void **)pp);") 34 cpp_quote(" }") 35 cpp_quote(" END_INTERFACE") 36 cpp_quote(" };") 37 cpp_quote("}") 38 cpp_quote("__CRT_UUID_DECL(IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46)") 39 cpp_quote("HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(IUnknown *This, REFIID riid, void **ppvObject);") 40 cpp_quote("void __RPC_STUB IUnknown_QueryInterface_Stub(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase);") 41 cpp_quote("ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(IUnknown *This);") 42 cpp_quote("void __RPC_STUB IUnknown_AddRef_Stub(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase);") 43 cpp_quote("ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(IUnknown *This);") 44 cpp_quote("void __RPC_STUB IUnknown_Release_Stub(IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase);") 45 cpp_quote("#else") 46 HRESULT QueryInterface ([in] REFIID riid,[out, iid_is (riid)] void **ppvObject); 47 ULONG AddRef (); 48 ULONG Release (); 49} 50cpp_quote("#endif") 51cpp_quote("#endif") 52 53cpp_quote("") 54cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)") 55[local, object, uuid (000e0000-0000-0000-C000-000000000046), pointer_default (unique)] 56interface AsyncIUnknown : IUnknown { 57 HRESULT Begin_QueryInterface ([in] REFIID riid); 58 HRESULT Finish_QueryInterface ([out] void **ppvObject); 59 HRESULT Begin_AddRef (); 60 ULONG Finish_AddRef (); 61 HRESULT Begin_Release (); 62 ULONG Finish_Release (); 63} 64cpp_quote("#endif") 65 66cpp_quote("") 67cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)") 68[object, uuid (00000001-0000-0000-C000-000000000046), pointer_default (unique)] 69interface IClassFactory : IUnknown { 70 typedef [unique] IClassFactory *LPCLASSFACTORY; 71cpp_quote("") 72 [local] HRESULT CreateInstance ([in, unique] IUnknown *pUnkOuter,[in] REFIID riid,[out, iid_is (riid)] void **ppvObject); 73 [call_as (CreateInstance)] HRESULT RemoteCreateInstance ([in] REFIID riid,[out, iid_is (riid)] IUnknown **ppvObject); 74 [local] HRESULT LockServer ([in] BOOL fLock); 75 [call_as (LockServer)] HRESULT __stdcall RemoteLockServer ([in] BOOL fLock); 76} 77cpp_quote("#endif") 78