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.

157 lines
5.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. // File: unknwn.idl
  7. //
  8. // Contents: IUnknown interface definition
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12. cpp_quote("//+-------------------------------------------------------------------------")
  13. cpp_quote("//")
  14. cpp_quote("// Microsoft Windows")
  15. cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
  16. cpp_quote("//")
  17. cpp_quote("//--------------------------------------------------------------------------")
  18. cpp_quote("#if ( _MSC_VER >= 1020 )")
  19. cpp_quote("#pragma once")
  20. cpp_quote("#endif")
  21. #ifndef DO_NO_IMPORTS
  22. import "wtypes.idl";
  23. #endif
  24. [
  25. local,
  26. object,
  27. uuid(00000000-0000-0000-C000-000000000046),
  28. pointer_default(unique)
  29. ]
  30. interface IUnknown
  31. {
  32. typedef [unique] IUnknown *LPUNKNOWN;
  33. cpp_quote("//////////////////////////////////////////////////////////////////")
  34. cpp_quote("// IID_IUnknown and all other system IIDs are provided in UUID.LIB")
  35. cpp_quote("// Link that library in with your proxies, clients and servers")
  36. cpp_quote("//////////////////////////////////////////////////////////////////")
  37. cpp_quote("")
  38. cpp_quote("#if (_MSC_VER >= 1100) && defined(__cplusplus) && !defined(CINTERFACE)")
  39. cpp_quote(" EXTERN_C const IID IID_IUnknown;")
  40. cpp_quote(" extern \"C++\"")
  41. cpp_quote(" {")
  42. cpp_quote(" MIDL_INTERFACE(\"00000000-0000-0000-C000-000000000046\")")
  43. cpp_quote(" IUnknown")
  44. cpp_quote(" {")
  45. cpp_quote(" public:")
  46. cpp_quote(" BEGIN_INTERFACE")
  47. cpp_quote(" virtual HRESULT STDMETHODCALLTYPE QueryInterface( ")
  48. cpp_quote(" /* [in] */ REFIID riid,")
  49. cpp_quote(" /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0;")
  50. cpp_quote(" ")
  51. cpp_quote(" virtual ULONG STDMETHODCALLTYPE AddRef( void) = 0;")
  52. cpp_quote(" ")
  53. cpp_quote(" virtual ULONG STDMETHODCALLTYPE Release( void) = 0;")
  54. cpp_quote(" ")
  55. cpp_quote(" template<class Q>")
  56. cpp_quote(" HRESULT STDMETHODCALLTYPE QueryInterface(Q** pp)")
  57. cpp_quote(" {")
  58. cpp_quote(" return QueryInterface(__uuidof(Q), (void **)pp);")
  59. cpp_quote(" }")
  60. cpp_quote(" ")
  61. cpp_quote(" END_INTERFACE")
  62. cpp_quote(" };")
  63. cpp_quote(" } // extern C++")
  64. cpp_quote(" HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(")
  65. cpp_quote(" IUnknown __RPC_FAR * This,")
  66. cpp_quote(" /* [in] */ REFIID riid,")
  67. cpp_quote(" /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);")
  68. cpp_quote(" ")
  69. cpp_quote(" void __RPC_STUB IUnknown_QueryInterface_Stub(")
  70. cpp_quote(" IRpcStubBuffer *This,")
  71. cpp_quote(" IRpcChannelBuffer *_pRpcChannelBuffer,")
  72. cpp_quote(" PRPC_MESSAGE _pRpcMessage,")
  73. cpp_quote(" DWORD *_pdwStubPhase);")
  74. cpp_quote(" ")
  75. cpp_quote(" ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(")
  76. cpp_quote(" IUnknown __RPC_FAR * This);")
  77. cpp_quote(" ")
  78. cpp_quote(" void __RPC_STUB IUnknown_AddRef_Stub(")
  79. cpp_quote(" IRpcStubBuffer *This,")
  80. cpp_quote(" IRpcChannelBuffer *_pRpcChannelBuffer,")
  81. cpp_quote(" PRPC_MESSAGE _pRpcMessage,")
  82. cpp_quote(" DWORD *_pdwStubPhase);")
  83. cpp_quote(" ")
  84. cpp_quote(" ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(")
  85. cpp_quote(" IUnknown __RPC_FAR * This);")
  86. cpp_quote(" ")
  87. cpp_quote(" void __RPC_STUB IUnknown_Release_Stub(")
  88. cpp_quote(" IRpcStubBuffer *This,")
  89. cpp_quote(" IRpcChannelBuffer *_pRpcChannelBuffer,")
  90. cpp_quote(" PRPC_MESSAGE _pRpcMessage,")
  91. cpp_quote(" DWORD *_pdwStubPhase);")
  92. cpp_quote("#else")
  93. HRESULT QueryInterface(
  94. [in] REFIID riid,
  95. [out, iid_is(riid)] void **ppvObject);
  96. ULONG AddRef();
  97. ULONG Release();
  98. }
  99. cpp_quote("#endif")
  100. [
  101. local,
  102. object,
  103. uuid(000e0000-0000-0000-C000-000000000046),
  104. pointer_default(unique)
  105. ]
  106. interface AsyncIUnknown : IUnknown
  107. {
  108. HRESULT Begin_QueryInterface([in] REFIID riid);
  109. HRESULT Finish_QueryInterface([out] void **ppvObject);
  110. HRESULT Begin_AddRef();
  111. ULONG Finish_AddRef();
  112. HRESULT Begin_Release();
  113. ULONG Finish_Release();
  114. }
  115. [
  116. object,
  117. uuid(00000001-0000-0000-C000-000000000046),
  118. pointer_default(unique)
  119. ]
  120. interface IClassFactory : IUnknown
  121. {
  122. typedef [unique] IClassFactory * LPCLASSFACTORY;
  123. [local]
  124. HRESULT CreateInstance(
  125. [in, unique] IUnknown * pUnkOuter,
  126. [in] REFIID riid,
  127. [out, iid_is(riid)] void **ppvObject);
  128. [call_as(CreateInstance)]
  129. HRESULT RemoteCreateInstance(
  130. [in] REFIID riid,
  131. [out, iid_is(riid)] IUnknown ** ppvObject);
  132. [local]
  133. HRESULT LockServer(
  134. [in] BOOL fLock);
  135. [call_as(LockServer)]
  136. HRESULT __stdcall RemoteLockServer(
  137. [in] BOOL fLock);
  138. }