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.

269 lines
7.8 KiB

  1. //
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. cpp_quote("/* Copyright (c) Microsoft Corporation. All rights reserved.*/")
  4. // mdhcp.idl : IDL source for mdhcp.dll
  5. //
  6. // This file will be processed by the MIDL tool to
  7. // produce the type library (mdhcp.tlb) and marshalling code.
  8. import "oaidl.idl";
  9. import "ocidl.idl";
  10. import "tapi3if.idl";
  11. /////////////////////////////////////////////////////////////////
  12. //
  13. // This interface wraps the MCAST_SCOPE_INFO structure
  14. //
  15. // it is read only, and only obtained from
  16. // enumeratescopes methods in the
  17. // IMcastAddressAllocation interface.
  18. //
  19. [
  20. object,
  21. uuid(DF0DAEF4-A289-11D1-8697-006008B0E5D2),
  22. dual,
  23. helpstring("IMcastScope Interface"),
  24. pointer_default(unique)
  25. ]
  26. interface IMcastScope : IDispatch
  27. {
  28. [propget, id(1), helpstring("Get the scope ID for this scope.")]
  29. HRESULT ScopeID(
  30. [out, retval] long *pID
  31. );
  32. [propget, id(2), helpstring("Get the server ID for this scope.")]
  33. HRESULT ServerID(
  34. [out, retval] long *pID
  35. );
  36. [propget, id(3), helpstring("Get the interface ID for this scope.")]
  37. HRESULT InterfaceID(
  38. [out, retval] long *pID
  39. );
  40. [propget, id(4), helpstring("Get a textual description of this scope.")]
  41. HRESULT ScopeDescription(
  42. [out, retval] BSTR *ppDescription
  43. );
  44. [propget, id(5), helpstring("Get the TTL for leases in this scope.")]
  45. HRESULT TTL(
  46. [out, retval] long *pTTL
  47. );
  48. }
  49. //
  50. // this interface wraps the MCAST_LEASE_REQUEST and/or MCAST_LEASE_RESPONSE
  51. // structures
  52. //
  53. // It's read-write. Most properties can only be
  54. // set from the client when the object
  55. // is created, except the start and stop times, which can be
  56. // set later for convenience when doing renewals.
  57. //
  58. [
  59. object,
  60. uuid(DF0DAEFD-A289-11D1-8697-006008B0E5D2),
  61. dual,
  62. helpstring("IMcastLeaseInfo Interface"),
  63. pointer_default(unique)
  64. ]
  65. interface IMcastLeaseInfo : IDispatch
  66. {
  67. [propget, id(1), helpstring("Get the request ID")]
  68. HRESULT RequestID(
  69. [out, retval ] BSTR * ppRequestID
  70. );
  71. [propget, id(2), helpstring("The start time of the lease.")]
  72. HRESULT LeaseStartTime(
  73. [out, retval] DATE *pTime
  74. );
  75. [propput, id(2), helpstring("The start time of the lease.")]
  76. HRESULT LeaseStartTime(
  77. [in] DATE time
  78. );
  79. [propget, id(3), helpstring("The stop time of the lease.")]
  80. HRESULT LeaseStopTime(
  81. [out, retval] DATE *pTime
  82. );
  83. [propput, id(3), helpstring("The stop time of the lease.")]
  84. HRESULT LeaseStopTime(
  85. [in] DATE time
  86. );
  87. [propget, id(4), helpstring("The number of addresses of the lease.")]
  88. HRESULT AddressCount(
  89. [out, retval] long *pCount
  90. );
  91. [propget, id(5), helpstring("The ip address of server where the lease was requested/renewed.")]
  92. HRESULT ServerAddress(
  93. [out, retval] BSTR *ppAddress
  94. );
  95. [propget, id(6), helpstring("The TTL of this lease assignment.")]
  96. HRESULT TTL(
  97. [out, retval] long *pTTL
  98. );
  99. //
  100. // collection (used in vb) for enumeration of addresses
  101. //
  102. [propget, id(7), helpstring("Get a collection of the addresses for this lease.")]
  103. HRESULT Addresses(
  104. [out, retval] VARIANT * pVariant
  105. );
  106. //
  107. // c method to enumerate addresses
  108. //
  109. [id(8), hidden, helpstring("Get an enumeration of the addresses for this lease.")]
  110. HRESULT EnumerateAddresses(
  111. [out, retval] IEnumBstr ** ppEnumAddresses
  112. );
  113. }
  114. // Obtained using IMcastAddressAllocation::EnumerateScopes
  115. [
  116. object,
  117. uuid(DF0DAF09-A289-11D1-8697-006008B0E5D2),
  118. hidden,
  119. helpstring("IEnumMcastScope Interface"),
  120. pointer_default(unique)
  121. ]
  122. interface IEnumMcastScope : IUnknown
  123. {
  124. HRESULT Next(
  125. [in] ULONG celt,
  126. [out] IMcastScope ** ppScopes,
  127. [in,out,ptr] ULONG * pceltFetched
  128. );
  129. HRESULT Reset( void );
  130. HRESULT Skip (
  131. [in] ULONG celt
  132. );
  133. HRESULT Clone (
  134. [out, retval] IEnumMcastScope ** ppEnum
  135. );
  136. }
  137. //
  138. // this interface encapsulates the 4
  139. // multicast address allocation functions
  140. //
  141. [
  142. object,
  143. uuid(DF0DAEF1-A289-11D1-8697-006008B0E5D2),
  144. dual,
  145. helpstring("IMcastAddressAllocation Interface"),
  146. pointer_default(unique)
  147. ]
  148. interface IMcastAddressAllocation : IDispatch
  149. {
  150. // This function is for VB and other scripting languages.
  151. // It returns a variant, which is a collection of IMcastScope pointers.
  152. [propget, id(1), helpstring("Get a collection of available scopes.")]
  153. HRESULT Scopes(
  154. [out, retval] VARIANT * pVariant
  155. );
  156. // This function is the same as the first one, but it is for C/C++.
  157. [id(2), hidden, helpstring("Get an enumeration of available scopes.")]
  158. HRESULT EnumerateScopes(
  159. [out] IEnumMcastScope ** ppEnumMcastScope
  160. );
  161. [id(3), helpstring("Request a lease for one or more multicast addresses.")]
  162. HRESULT RequestAddress(
  163. [in] IMcastScope * pScope, // from the scope enum
  164. [in] DATE LeaseStartTime, // desired begin time
  165. [in] DATE LeaseStopTime, // desired end time
  166. [in] long NumAddresses, // how many addresses we want
  167. [out, retval] IMcastLeaseInfo ** ppLeaseResponse // returned on success.
  168. // contains parameters of what
  169. // was actually granted
  170. );
  171. [id(4), helpstring("Renew a lease.")]
  172. HRESULT RenewAddress(
  173. [in] long lReserved, // unused
  174. [in] IMcastLeaseInfo * pRenewRequest,
  175. [out, retval] IMcastLeaseInfo ** ppRenewResponse
  176. );
  177. [id(5), helpstring("Release (unreserve) a lease.")]
  178. HRESULT ReleaseAddress(
  179. [in] IMcastLeaseInfo * pReleaseRequest
  180. );
  181. [id(6), hidden, helpstring("Create a lease info object -- C++ version.")]
  182. HRESULT CreateLeaseInfo(
  183. [in] DATE LeaseStartTime,
  184. [in] DATE LeaseStopTime,
  185. [in] DWORD dwNumAddresses,
  186. [in] LPWSTR * ppAddresses,
  187. [in] LPWSTR pRequestID,
  188. [in] LPWSTR pServerAddress,
  189. [out, retval] IMcastLeaseInfo ** ppReleaseRequest
  190. );
  191. [id(7), helpstring("Create a lease info object -- Automation version.")]
  192. HRESULT CreateLeaseInfoFromVariant(
  193. [in] DATE LeaseStartTime,
  194. [in] DATE LeaseStopTime,
  195. [in] VARIANT vAddresses,
  196. [in] BSTR pRequestID,
  197. [in] BSTR pServerAddress,
  198. [out, retval] IMcastLeaseInfo ** ppReleaseRequest
  199. );
  200. }
  201. // The type library.
  202. [
  203. uuid(64217CC0-A285-11D1-8697-006008B0E5D2),
  204. version(1.0),
  205. helpstring("Microsoft Multicast Address Allocation Client COM Wrapper 1.0 Type Library")
  206. ]
  207. library McastLib
  208. {
  209. importlib("stdole2.tlb");
  210. interface IMcastScope;
  211. interface IEnumBstr;
  212. interface IMcastLeaseInfo;
  213. interface IEnumMcastScope;
  214. interface IMcastAddressAllocation;
  215. [
  216. uuid(DF0DAEF2-A289-11D1-8697-006008B0E5D2),
  217. helpstring("Multicast Address Allocation Class")
  218. ]
  219. coclass McastAddressAllocation
  220. {
  221. [default] interface IMcastAddressAllocation;
  222. };
  223. };