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.

174 lines
5.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: odeath.idl
  7. //
  8. //+-------------------------------------------------------------------------
  9. #ifndef DO_NO_IMPORTS
  10. import "unknwn.idl";
  11. import "obase.idl";
  12. import "wtypes.idl";
  13. import "objidl.idl";
  14. import "objidl.idl";
  15. #endif
  16. //+-------------------------------------------------------------------------
  17. //
  18. // Struct: XAptCallback
  19. //
  20. // Synopsys: An object context's DoCallback method must switch to its
  21. // apartment if it resides in a different apartment than the
  22. // caller. The context calls its apartment's remote unknown
  23. // to accomplish the switch. This structure is a parameter
  24. // block the object context passes to the remote unknown's
  25. // DoCallback method.
  26. //
  27. //--------------------------------------------------------------------------
  28. typedef __int64 PTRMEM;
  29. #define GUIDSTR_MAX (1+ 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)
  30. typedef struct tagXAptCallback
  31. {
  32. PTRMEM pfnCallback;
  33. PTRMEM pParam;
  34. PTRMEM pServerCtx;
  35. PTRMEM pUnk;
  36. GUID iid;
  37. int iMethod;
  38. GUID guidProcessSecret;
  39. } XAptCallback;
  40. //+-------------------------------------------------------------------------
  41. //
  42. // Interface: IRemUnknownN
  43. //
  44. // Synopsys: This is a local interface used to convert strong references
  45. // to weak references and vice versa. It is needed for the
  46. // container/link/embedding aspects of OLE.
  47. //
  48. // It inherits from the highest numbered IRemUnknown version
  49. // that is known for the current machine.
  50. //
  51. // Notes: Weak references are not permitted remotely.
  52. //
  53. //+-------------------------------------------------------------------------
  54. [
  55. object,
  56. uuid(0000013C-0000-0000-C000-000000000046),
  57. async_uuid(000B013C-0000-0000-C000-000000000046)
  58. ]
  59. interface IRemUnknownN : IRemUnknown2
  60. {
  61. #ifndef DO_NO_IMPORTS
  62. import "remunk.idl";
  63. #endif
  64. const unsigned long IRUF_CONVERTTOWEAK = 0x01;// make refs weak
  65. const unsigned long IRUF_CONVERTTOSTRONG = 0x02;// make refs strong
  66. const unsigned long IRUF_DISCONNECTIFLASTSTRONG = 0x04;// disconnect the
  67. // object if last strong ref
  68. HRESULT RemChangeRef
  69. (
  70. [in] unsigned long flags,
  71. [in] unsigned short cInterfaceRefs,
  72. [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
  73. );
  74. HRESULT DoCallback
  75. (
  76. [in] XAptCallback *pCallbackData
  77. );
  78. }
  79. //
  80. // Enumeration to describe status of trying to run an oid down
  81. //
  82. typedef enum
  83. {
  84. ORS_DONTRUNDOWN = 0x0, // rundown refused
  85. ORS_OK_TO_RUNDOWN = 0x1, // rundown accepted
  86. ORS_OID_PINNED = 0x2 // rundown refused because stub is locked
  87. } OID_RUNDOWN_STATUS;
  88. //+-------------------------------------------------------------------------
  89. //
  90. // Interface: IRundown
  91. //
  92. // Synopsys: This is the local OID rundown interface. The object exporter
  93. // calls it to notify the server which OIDs are no longer being
  94. // pinged.
  95. //
  96. // Notes: This inherits from IRemUnknownN so that we can use the same
  97. // IPID for all three interfaces. This is strictly a local
  98. // implementation decision and does not affect remote protocol.
  99. //
  100. //+-------------------------------------------------------------------------
  101. [
  102. uuid(00000134-0000-0000-C000-000000000046)
  103. #ifndef RAW
  104. , async_uuid(000e0134-0000-0000-C000-000000000046),
  105. object
  106. #endif
  107. ]
  108. interface IRundown
  109. #ifndef RAW
  110. : IRemUnknownN
  111. #endif
  112. {
  113. #ifndef DO_NO_IMPORTS
  114. import "iface.idl";
  115. import "obase.idl";
  116. import "remunk.idl";
  117. #endif
  118. #include "comhndl.h"
  119. COM_DEFINES(IOSCM)
  120. #ifdef RAW
  121. // Define the functions in IRemUnknown2
  122. HRESULT DummyRemQuery( handle_t handle );
  123. HRESULT DummyRemAddRef( handle_t handle );
  124. HRESULT DummyRemRelease( handle_t handle );
  125. HRESULT DummyRemChangeRef( handle_t handle );
  126. HRESULT DummyRemQueryInterface2( handle_t handle);
  127. HRESULT DummyDoCallBack( handle_t handle);
  128. error_status_t RawRundownOid
  129. #else
  130. HRESULT RundownOid
  131. #endif
  132. (
  133. COM_HANDLE
  134. [in] ULONG cOid,
  135. [in, size_is(cOid)] OID aOid[],
  136. [out, size_is(cOid)] BYTE aRundownStatus[] // see OID_RUNDOWN_STATUS above
  137. );
  138. }
  139. #ifndef RAW
  140. //+-------------------------------------------------------------------------
  141. //
  142. // Interface: IDisconnectSink
  143. //
  144. // Interface is implemented by people who want to know about when a stub
  145. // goes away.
  146. //
  147. //+-------------------------------------------------------------------------
  148. [
  149. object,
  150. uuid(0000014A-0000-0000-C000-000000000046),
  151. local
  152. ]
  153. interface IDisconnectSink : IUnknown
  154. {
  155. void OnDisconnect([in]void *pvCookie);
  156. }
  157. #endif