Source code of Windows XP (NT5)
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.

262 lines
5.9 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. winsif.idl
  5. Abstract:
  6. Contains the WINS Server Service API.
  7. Also contains the RPC specific data structures for these API.
  8. Author:
  9. Pradeep Bahl Apr, 1993
  10. Environment:
  11. User Mode - Win32 - MIDL
  12. Revision History:
  13. --*/
  14. //
  15. // Interface Attributes
  16. //
  17. //
  18. // UUID for the winsif interface. This was generated by uuidgen /i on
  19. // pradeepb_486 at 10:22 am.
  20. //
  21. [
  22. uuid(45F52C28-7F9F-101A-B52B-08002B2EFABE),
  23. version(1.0),
  24. #ifdef __midl
  25. ms_union,
  26. #endif // __midl
  27. pointer_default(unique)
  28. ]
  29. //
  30. // Interface Keyword
  31. //
  32. interface winsif
  33. //
  34. // Interface Body
  35. //
  36. {
  37. import "winsimp.idl";
  38. //
  39. // ---------------------------------------------------------------//
  40. //
  41. // Note that there are two kinds of handles below. Originally, almost
  42. // all RPC apis did not take explicit handle as an argument. WinsBind
  43. // created an implicit handle and the same handle was used for making
  44. // rpc calls. There were few APIs ( GetBroserName and WinsStatusWHdl)
  45. // which tool explicit handle as an argument. This handle was a user
  46. // defined type WINSINTF_BIND_DATA_T.
  47. //
  48. // However, this original scheme had fundamental problem that multiple
  49. // threads could not call the apis simultaneously with binding to different
  50. // wins servers. (coz there was only one implicit binding common for all
  51. // the threads )
  52. //
  53. // To get around this problem, a new handle was created WINSIF2_HANDLE.
  54. // The client stubs take this handle as an argument, but to keep the
  55. // rpc backward compatible, the server apis are kept the same as before.
  56. // i.e the server side stubs do not take handle as an argument. Since
  57. // the WINSIF2_HANDLE is defined as handle_t (primitive), it is not
  58. // passed on the wire and things work out ok. The makefil0 is modified
  59. // so that the client stubs and the server stubs generate different
  60. // signatures for the apis. DECLARE_WINS_HANDLE macro does the required
  61. // trick here.
  62. //
  63. // In future, if new APIs need to be added, pls. always pass WINSIF2_HANDLE
  64. // explicitly to both server and the client side.
  65. //
  66. typedef handle_t WINSIF2_HANDLE;
  67. typedef [handle] PWINSINTF_BIND_DATA_T WINSIF_HANDLE;
  68. //
  69. // WINS Server APIs
  70. //
  71. #ifdef WINS_CLIENT_APIS
  72. #define DECLARE_WINS_HANDLE( _hdl ) [in] WINSIF2_HANDLE _hdl,
  73. #define DECLARE_WINS_HANDLE0( _hdl ) [in] WINSIF2_HANDLE _hdl
  74. #else
  75. #define DECLARE_WINS_HANDLE( _hdl )
  76. #define DECLARE_WINS_HANDLE0( _hdl )
  77. #endif WINS_CLIENT_APIS
  78. //
  79. // APIs to
  80. //
  81. DWORD
  82. R_WinsRecordAction(
  83. DECLARE_WINS_HANDLE( ServerHdl )
  84. [in, out, ref] PWINSINTF_RECORD_ACTION_T *ppRecAction
  85. );
  86. DWORD
  87. R_WinsStatus(
  88. DECLARE_WINS_HANDLE( ServerHdl )
  89. [in] WINSINTF_CMD_E Cmd_e,
  90. [in, out, ref] PWINSINTF_RESULTS_T pResults
  91. );
  92. DWORD
  93. R_WinsTrigger(
  94. DECLARE_WINS_HANDLE( ServerHdl )
  95. [in, ref] PWINSINTF_ADD_T pWinsAdd,
  96. [in] WINSINTF_TRIG_TYPE_E TrigType_e
  97. );
  98. DWORD
  99. R_WinsDoStaticInit(
  100. DECLARE_WINS_HANDLE( ServerHdl )
  101. [in, unique, string] LPWSTR pDataFilePath,
  102. [in] DWORD fDel
  103. );
  104. DWORD
  105. R_WinsDoScavenging(
  106. DECLARE_WINS_HANDLE0( ServerHdl )
  107. );
  108. DWORD
  109. R_WinsGetDbRecs(
  110. DECLARE_WINS_HANDLE( ServerHdl )
  111. [in, ref] PWINSINTF_ADD_T pWinsAdd,
  112. [in] WINSINTF_VERS_NO_T MinVersNo,
  113. [in] WINSINTF_VERS_NO_T MaxVersNo,
  114. [out] PWINSINTF_RECS_T pRecs
  115. );
  116. DWORD
  117. R_WinsTerm(
  118. [in] handle_t ServerHdl,
  119. [in] short fAbruptTem
  120. );
  121. DWORD
  122. R_WinsBackup(
  123. DECLARE_WINS_HANDLE( ServerHdl )
  124. [in, string, ref] LPBYTE pBackupPath,
  125. [in] short fIncremental
  126. );
  127. DWORD
  128. R_WinsDelDbRecs(
  129. DECLARE_WINS_HANDLE( ServerHdl )
  130. [in, ref] PWINSINTF_ADD_T pWinsAdd,
  131. [in] WINSINTF_VERS_NO_T MinVersNo,
  132. [in] WINSINTF_VERS_NO_T MaxVersNo
  133. );
  134. DWORD
  135. R_WinsPullRange(
  136. DECLARE_WINS_HANDLE( ServerHdl )
  137. [in, ref] PWINSINTF_ADD_T pWinsAdd,
  138. [in, ref] PWINSINTF_ADD_T pOwnerAdd,
  139. [in] WINSINTF_VERS_NO_T MinVersNo,
  140. [in] WINSINTF_VERS_NO_T MaxVersNo
  141. );
  142. DWORD
  143. R_WinsSetPriorityClass(
  144. DECLARE_WINS_HANDLE( ServerHdl )
  145. [in] WINSINTF_PRIORITY_CLASS_E PrCls_e
  146. );
  147. DWORD
  148. R_WinsResetCounters(
  149. DECLARE_WINS_HANDLE0( ServerHdl )
  150. );
  151. DWORD
  152. R_WinsWorkerThdUpd(
  153. DECLARE_WINS_HANDLE( ServerHdl )
  154. [in] DWORD NewNoOfNbtThds
  155. );
  156. //
  157. // Keep size_is value > MAX_COMPUTERNAME_LENGTH. Somehow, the idl parser
  158. // is not liking a symbol here. No time to investigate this more at this
  159. // time
  160. //
  161. DWORD
  162. R_WinsGetNameAndAdd(
  163. DECLARE_WINS_HANDLE( ServerHdl )
  164. [out, ref] PWINSINTF_ADD_T pWinsAdd,
  165. [out, string, size_is(80)] LPBYTE pUncName
  166. );
  167. DWORD
  168. R_WinsGetBrowserNames_Old(
  169. DECLARE_WINS_HANDLE( ServerHdl )
  170. [out] PWINSINTF_BROWSER_NAMES_T pNames
  171. );
  172. DWORD
  173. R_WinsDeleteWins(
  174. DECLARE_WINS_HANDLE( ServerHdl )
  175. [in, ref] PWINSINTF_ADD_T pWinsAdd
  176. );
  177. DWORD
  178. R_WinsSetFlags(
  179. DECLARE_WINS_HANDLE( ServerHdl )
  180. [in] DWORD fFlags
  181. );
  182. DWORD
  183. R_WinsGetBrowserNames(
  184. [in, ref] WINSIF_HANDLE ServerHdl,
  185. [out] PWINSINTF_BROWSER_NAMES_T pNames
  186. );
  187. DWORD
  188. R_WinsGetDbRecsByName(
  189. DECLARE_WINS_HANDLE( ServerHdl )
  190. [in, unique] PWINSINTF_ADD_T pWinsAdd,
  191. [in] DWORD Location,
  192. [in, unique, size_is(NameLen + 1)] LPBYTE pName,
  193. [in] DWORD NameLen,
  194. [in] DWORD NoOfRecsDesired,
  195. [in] DWORD fOnlyStatic,
  196. [out] PWINSINTF_RECS_T pRecs
  197. );
  198. DWORD
  199. R_WinsStatusNew(
  200. DECLARE_WINS_HANDLE( ServerHdl )
  201. [in] WINSINTF_CMD_E Cmd_e,
  202. [out] PWINSINTF_RESULTS_NEW_T pResults
  203. );
  204. DWORD
  205. R_WinsStatusWHdl(
  206. [in, ref] WINSIF_HANDLE ServerHdl,
  207. [in] WINSINTF_CMD_E Cmd_e,
  208. [in, out, ref] PWINSINTF_RESULTS_NEW_T pResults
  209. );
  210. DWORD
  211. R_WinsDoScavengingNew(
  212. DECLARE_WINS_HANDLE( ServerHdl )
  213. [in, ref] PWINSINTF_SCV_REQ_T pScvReq
  214. );
  215. }