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.

1039 lines
21 KiB

  1. #ifndef WINSINTF_H
  2. #define WINSINTF_H
  3. /*++
  4. Copyright (c) Microsoft Corporation. All rights reserved.
  5. Module Name:
  6. winsintf.h
  7. Abstract:
  8. This is the header file to be included in a client of the WINS
  9. Functions:
  10. Portability:
  11. This header is portable.
  12. Author:
  13. Pradeep Bahl (PradeepB) April-1993
  14. Revision History:
  15. Modification Date Person Description of Modification
  16. ------------------ ------- ---------------------------
  17. --*/
  18. /*
  19. includes
  20. */
  21. #include <winbase.h>
  22. #if !defined(MIDL_PASS)
  23. #include <rpc.h>
  24. #include <rpcasync.h>
  25. #include <winerror.h>
  26. #endif
  27. #ifdef WINS_CLIENT_APIS
  28. #define DECLARE_WINS_HANDLE( _hdl ) WINSIF2_HANDLE _hdl,
  29. #define DECLARE_WINS_HANDLE0( _hdl ) WINSIF2_HANDLE _hdl
  30. #else
  31. #define DECLARE_WINS_HANDLE( _hdl )
  32. #define DECLARE_WINS_HANDLE0( _hdl )
  33. #endif WINS_CLIENT_APIS
  34. /*
  35. defines
  36. */
  37. #define WINSINTF_MAX_NAME_SIZE 255
  38. //#define WINSINTF_MAX_COMPUTERNAME_LENGTH (MAX_COMPUTERNAME_LENGTH + 1)
  39. #define WINSINTF_MAX_NO_RPL_PNRS 25
  40. #define WINSINTF_SUCCESS ERROR_SUCCESS
  41. #define WINSINTF_FAILURE ERROR_WINS_INTERNAL
  42. #define WINSINTF_CAN_NOT_DEL_LOCAL_WINS ERROR_CAN_NOT_DEL_LOCAL_WINS
  43. #define WINSINTF_STATIC_INIT_FAILED ERROR_STATIC_INIT
  44. #define WINSINTF_INC_BACKUP_FAILED ERROR_INC_BACKUP
  45. #define WINSINTF_FULL_BACKUP_FAILED ERROR_FULL_BACKUP
  46. #define WINSINTF_REC_NOT_FOUND ERROR_REC_NON_EXISTENT
  47. #define WINSINTF_RPL_NOT_ALLOWED ERROR_RPL_NOT_ALLOWED
  48. #define WINSINTF_TOO_MANY_STATIC_INITS ERROR_TOO_MANY_OPEN_FILES
  49. #define WINSINTF_LAST_FAILURE_CODE WINSINTF_TOO_MANY_STATIC_INITS
  50. #define WINS_BACKUP_DIR_ASCII "\\wins_bak"
  51. #define WINS_BACKUP_DIR TEXT(WINS_BACKUP_DIR_ASCII)
  52. //
  53. // Flags that can be set in WINS
  54. //
  55. #define WINSINTF_BS 0x01
  56. #define WINSINTF_MEMORY_INFO_DUMP 0x02
  57. #define WINSINTF_HEAP_INFO_DUMP 0x04
  58. #define WINSINTF_QUE_ITEMS_DUMP 0x08
  59. #define WINS_NO_ACCESS 0x0
  60. #define WINS_CONTROL_ACCESS 0x0001
  61. #define WINS_QUERY_ACCESS 0x0002
  62. #define WINS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
  63. WINS_CONTROL_ACCESS |WINS_QUERY_ACCESS)
  64. //
  65. // Type of address families
  66. //
  67. #define WINSINTF_TCP_IP 0x0
  68. //
  69. // Type Of Recs to retrieve (WinsGetDbRecsByName)
  70. //
  71. // Note: There should be no ovelap of bit patterns
  72. //
  73. #define WINSINTF_STATIC 1
  74. #define WINSINTF_DYNAMIC 2
  75. #define WINSINTF_BOTH 4
  76. //
  77. // Max. members returned for a special group or a multihomed entry
  78. //
  79. #define WINSINTF_MAX_MEM 25
  80. #define WINSINTF_MAX_ADD (WINSINTF_MAX_MEM * 2)
  81. //
  82. // used as argument of WinsGetDbRecsByName
  83. //
  84. #define WINSINTF_BEGINNING 0
  85. #define WINSINTF_END 1
  86. /*
  87. macros
  88. */
  89. //
  90. // Pass the value of the field NameLen (WINSINTF_RECORD_ACTION_T) to get
  91. // the actual length of the name
  92. //
  93. #define WINSINTF_NAME_LEN_M(NameLen) ((NameLen) - 1)
  94. /*
  95. externs
  96. */
  97. struct _WINSINTF_STAT_T; //forward declaration
  98. #if !defined(MIDL_PASS)
  99. extern struct _WINSINTF_STAT_T WinsIntfStat;
  100. extern CRITICAL_SECTION WinsIntfCrtSec;
  101. extern CRITICAL_SECTION WinsIntfPotentiallyLongCrtSec;
  102. #endif
  103. extern DWORD WinsIntfNoOfNbtThds;
  104. extern DWORD WinsIntfNoCncrntStaticInits;
  105. //extern DWORD WinsIntfNoOfRpcThds;
  106. #ifndef UNICODE
  107. #define WinsBind WinsABind
  108. #else
  109. #define WinsBind WinsUBind
  110. #endif
  111. /*
  112. * typedefs
  113. */
  114. typedef LARGE_INTEGER WINSINTF_VERS_NO_T;
  115. typedef handle_t WINSIF2_HANDLE;
  116. //
  117. // NOTE NOTE NOTE
  118. //
  119. // When UNICODE is defined, the client should put a unicode string in
  120. // the pServerAdd and pPipeName fields.
  121. //
  122. typedef struct _WINSINTF_BIND_DATA_T {
  123. DWORD fTcpIp;
  124. LPSTR pServerAdd; //IP address
  125. LPSTR pPipeName; //unc name
  126. } WINSINTF_BIND_DATA_T, *PWINSINTF_BIND_DATA_T;
  127. typedef struct _WINSINTF_ADD_T {
  128. BYTE Type;
  129. DWORD Len;
  130. DWORD IPAdd;
  131. } WINSINTF_ADD_T, *PWINSINTF_ADD_T;
  132. /*
  133. enum definitions. Have the enum types be of the same value as given
  134. in nmsdb.h for the various types (otherwise modify winsintf.c code)
  135. */
  136. //
  137. // Wins Priority Class
  138. //
  139. typedef enum _WINSINTF_PRIORITY_CLASS_E {
  140. WINSINTF_E_NORMAL = 0,
  141. WINSINTF_E_HIGH
  142. } WINSINTF_PRIORITY_CLASS_E, *PWINSINTF_PRIORITY_CLASS_E;
  143. //
  144. // same values as those defined in nmsdb.h
  145. //
  146. //
  147. //NOTE NOTE NOTE
  148. //
  149. // For the enum below, WINSINTF_E_MULTIHOMED should be the last entry. If
  150. // it is not, you should change WinsRecordAction (under MODIFY) in winsintf.c
  151. //
  152. // Do not disturb the order without changing wins.mib correspondingly
  153. //
  154. typedef enum _WINSINTF_RECTYPE_E {
  155. WINSINTF_E_UNIQUE = 0,
  156. WINSINTF_E_NORM_GROUP,
  157. WINSINTF_E_SPEC_GROUP,
  158. WINSINTF_E_MULTIHOMED
  159. } WINSINTF_RECTYPE_E, *PWINSINTF_RECTYPE_E;
  160. //
  161. // Same values as those in NMSDB_STATE_E
  162. //
  163. //
  164. //NOTE NOTE NOTE
  165. //
  166. // For the enum below, WINSINTF_E_DELETED should be the last entry. If
  167. // it is not, you should change WinsRecordAction (under MODIFY) in winsintf.c
  168. //
  169. // NOTE NOTE NOTE
  170. //
  171. // Do not disturb the order without changing wins.mib correspondingly
  172. //
  173. typedef enum _WINSINTF_STATE_E {
  174. WINSINTF_E_ACTIVE = 0,
  175. WINSINTF_E_RELEASED,
  176. WINSINTF_E_TOMBSTONE,
  177. WINSINTF_E_DELETED
  178. } WINSINTF_STATE_E, *PWINSINTF_STATE_E;
  179. typedef enum _WINSINTF_NODE_TYPE_E {
  180. WINSINTF_E_BNODE = 0,
  181. WINSINTF_E_PNODE,
  182. WINSINTF_E_HNODE = 3,
  183. } WINSINTF_NODE_TYPE_E, *PWINSINTF_NODE_TYPE_E;
  184. //
  185. // Type of action to take on a record. This is passed as the "command" to
  186. // WinsRecordAction.
  187. //
  188. typedef enum _WINSINTF_ACT_E {
  189. WINSINTF_E_INSERT = 0,
  190. WINSINTF_E_DELETE,
  191. WINSINTF_E_RELEASE,
  192. WINSINTF_E_MODIFY,
  193. WINSINTF_E_QUERY
  194. } WINSINTF_ACT_E, *PWINSINTF_ACT_E;
  195. //
  196. // Passed as argument to WinsIntfSetTime
  197. //
  198. typedef enum _WINSINTF_TIME_TYPE_E {
  199. WINSINTF_E_PLANNED_PULL = 0,
  200. WINSINTF_E_ADDCHG_TRIG_PULL,
  201. WINSINTF_E_UPDCNT_TRIG_PULL,
  202. WINSINTF_E_ADMIN_TRIG_PULL,
  203. WINSINTF_E_NTWRK_TRIG_PULL,
  204. WINSINTF_E_PLANNED_SCV,
  205. WINSINTF_E_ADMIN_TRIG_SCV,
  206. WINSINTF_E_TOMBSTONES_SCV,
  207. WINSINTF_E_VERIFY_SCV,
  208. WINSINTF_E_INIT_DB,
  209. WINSINTF_E_WINS_START,
  210. WINSINTF_E_COUNTER_RESET
  211. } WINSINTF_TIME_TYPE_E, *PWINSINTF_TIME_TYPE_E;
  212. //
  213. // Type of trigger to send to a WINS
  214. //
  215. typedef enum _WINSINTF_TRIG_TYPE_E {
  216. WINSINTF_E_PULL = 0,
  217. WINSINTF_E_PUSH,
  218. WINSINTF_E_PUSH_PROP
  219. } WINSINTF_TRIG_TYPE_E, *PWINSINTF_TRIG_TYPE_E;
  220. typedef struct _WINSINTF_RECORD_ACTION_T {
  221. WINSINTF_ACT_E Cmd_e;
  222. #if defined(MIDL_PASS)
  223. [size_is(NameLen + 1)] LPBYTE pName; //ansi form
  224. #else
  225. LPBYTE pName;
  226. #endif
  227. DWORD NameLen;
  228. DWORD TypOfRec_e;
  229. DWORD NoOfAdds;
  230. #if defined(MIDL_PASS)
  231. [unique, size_is(NoOfAdds)] PWINSINTF_ADD_T pAdd;
  232. #else
  233. PWINSINTF_ADD_T pAdd;
  234. #endif
  235. WINSINTF_ADD_T Add;
  236. LARGE_INTEGER VersNo;
  237. BYTE NodeTyp;
  238. DWORD OwnerId;
  239. DWORD State_e;
  240. DWORD fStatic;
  241. DWORD_PTR TimeStamp;
  242. } WINSINTF_RECORD_ACTION_T, *PWINSINTF_RECORD_ACTION_T;
  243. typedef struct _WINSINTF_RPL_COUNTERS_T {
  244. WINSINTF_ADD_T Add;
  245. DWORD NoOfRpls;
  246. DWORD NoOfCommFails;
  247. } WINSINTF_RPL_COUNTERS_T, *PWINSINTF_RPL_COUNTERS_T;
  248. //
  249. // Structure holds the various statistics collected by WINS
  250. //
  251. typedef struct _WINSINTF_STAT_T {
  252. struct {
  253. DWORD NoOfUniqueReg;
  254. DWORD NoOfGroupReg;
  255. DWORD NoOfQueries;
  256. DWORD NoOfSuccQueries;
  257. DWORD NoOfFailQueries;
  258. DWORD NoOfUniqueRef;
  259. DWORD NoOfGroupRef;
  260. DWORD NoOfRel;
  261. DWORD NoOfSuccRel;
  262. DWORD NoOfFailRel;
  263. DWORD NoOfUniqueCnf;
  264. DWORD NoOfGroupCnf;
  265. } Counters;
  266. struct {
  267. SYSTEMTIME WinsStartTime;
  268. SYSTEMTIME LastPScvTime;
  269. SYSTEMTIME LastATScvTime; //admin triggered
  270. SYSTEMTIME LastTombScvTime;
  271. SYSTEMTIME LastVerifyScvTime;
  272. SYSTEMTIME LastPRplTime;
  273. SYSTEMTIME LastATRplTime; //admin triggered
  274. SYSTEMTIME LastNTRplTime; //network triggered
  275. SYSTEMTIME LastACTRplTime; //address change triggered
  276. SYSTEMTIME LastInitDbTime; //db initialization
  277. SYSTEMTIME CounterResetTime; //counter reset time
  278. } TimeStamps;
  279. DWORD NoOfPnrs;
  280. #if defined(MIDL_PASS)
  281. [unique, size_is(NoOfPnrs)] PWINSINTF_RPL_COUNTERS_T pRplPnrs;
  282. #else
  283. PWINSINTF_RPL_COUNTERS_T pRplPnrs;
  284. #endif
  285. } WINSINTF_STAT_T, *PWINSINTF_STAT_T;
  286. typedef struct _WINSINTF_ADD_VERS_MAP_T {
  287. WINSINTF_ADD_T Add;
  288. LARGE_INTEGER VersNo;
  289. } WINSINTF_ADD_VERS_MAP_T, *PWINSINTF_ADD_VERS_MAP_T;
  290. typedef struct _WINSINTF_RESULTS_T {
  291. DWORD NoOfOwners;
  292. WINSINTF_ADD_VERS_MAP_T AddVersMaps[WINSINTF_MAX_NO_RPL_PNRS];
  293. LARGE_INTEGER MyMaxVersNo;
  294. DWORD RefreshInterval;
  295. DWORD TombstoneInterval;
  296. DWORD TombstoneTimeout;
  297. DWORD VerifyInterval;
  298. DWORD WinsPriorityClass;
  299. DWORD NoOfWorkerThds;
  300. WINSINTF_STAT_T WinsStat;
  301. } WINSINTF_RESULTS_T, *PWINSINTF_RESULTS_T;
  302. typedef struct _WINSINTF_RESULTS_NEW_T {
  303. DWORD NoOfOwners;
  304. #if defined(MIDL_PASS)
  305. [unique, size_is(NoOfOwners)] PWINSINTF_ADD_VERS_MAP_T pAddVersMaps;
  306. #else
  307. PWINSINTF_ADD_VERS_MAP_T pAddVersMaps;
  308. #endif
  309. LARGE_INTEGER MyMaxVersNo;
  310. DWORD RefreshInterval;
  311. DWORD TombstoneInterval;
  312. DWORD TombstoneTimeout;
  313. DWORD VerifyInterval;
  314. DWORD WinsPriorityClass;
  315. DWORD NoOfWorkerThds;
  316. WINSINTF_STAT_T WinsStat;
  317. } WINSINTF_RESULTS_NEW_T, *PWINSINTF_RESULTS_NEW_T;
  318. typedef enum _WINSINTF_CMD_E {
  319. WINSINTF_E_ADDVERSMAP = 0,
  320. WINSINTF_E_CONFIG,
  321. WINSINTF_E_STAT, //get statistics
  322. WINSINTF_E_CONFIG_ALL_MAPS
  323. } WINSINTF_CMD_E, *PWINSINTF_CMD_E;
  324. #if 0
  325. typedef struct _WINSINTF_RECS_T {
  326. PWINSINTF_RECORD_ACTION_T pRow;
  327. DWORD NoOfRecs;
  328. DWORD TotalNoOfRecs;
  329. } WINSINTF_RECS_T, *PWINSINTF_RECS_T;
  330. typedef struct _WINSINTF_RECS_T {
  331. DWORD BuffSize;
  332. #if defined(MIDL_PASS)
  333. [unique,size_is(BuffSize)] LPBYTE pRow; //will store a pointer to
  334. //an array of
  335. //WINSINTF_RECORD_ACTION_T
  336. //recs
  337. #else
  338. LPBYTE pRow;
  339. #endif
  340. DWORD NoOfRecs;
  341. DWORD TotalNoOfRecs;
  342. } WINSINTF_RECS_T, *PWINSINTF_RECS_T;
  343. #endif
  344. typedef struct _WINSINTF_RECS_T {
  345. DWORD BuffSize;
  346. #if defined(MIDL_PASS)
  347. [unique,size_is(NoOfRecs)] PWINSINTF_RECORD_ACTION_T pRow; //will store a pointer to
  348. //an array of
  349. //WINSINTF_RECORD_ACTION_T
  350. //recs
  351. #else
  352. PWINSINTF_RECORD_ACTION_T pRow;
  353. #endif
  354. DWORD NoOfRecs;
  355. DWORD TotalNoOfRecs;
  356. } WINSINTF_RECS_T, *PWINSINTF_RECS_T;
  357. //
  358. // Provides information to the Pull thread for pulling the specfied range
  359. // of records from a WINS server. This structure is passed with the
  360. // QUE_E_CMD_PULL_RANGE cmd.
  361. //
  362. typedef struct _WINSINTF_PULL_RANGE_INFO_T {
  363. LPVOID pPnr; //info of pnr to pull from
  364. WINSINTF_ADD_T OwnAdd;
  365. WINSINTF_VERS_NO_T MinVersNo;
  366. WINSINTF_VERS_NO_T MaxVersNo;
  367. } WINSINTF_PULL_RANGE_INFO_T, *PWINSINTF_PULL_RANGE_INFO_T;
  368. //
  369. // NOTE NOTE NOTE:
  370. //
  371. // This structure is exactly the same as SERVER_INFO_100_CONTAINER.
  372. // IT SHOULD STAY THE SAME.
  373. //
  374. typedef struct _WINSINTF_BROWSER_INFO_T {
  375. DWORD dwNameLen;
  376. #if defined(MIDL_PASS)
  377. [string] LPBYTE pName;
  378. #else
  379. LPBYTE pName;
  380. #endif
  381. } WINSINTF_BROWSER_INFO_T, *PWINSINTF_BROWSER_INFO_T;
  382. typedef struct _WINSINTF_BROWSER_NAMES_T {
  383. DWORD EntriesRead; //no use
  384. #if defined(MIDL_PASS)
  385. [unique, size_is(EntriesRead)] PWINSINTF_BROWSER_INFO_T pInfo;
  386. #else
  387. PWINSINTF_BROWSER_INFO_T pInfo;
  388. #endif
  389. } WINSINTF_BROWSER_NAMES_T, *PWINSINTF_BROWSER_NAMES_T;
  390. typedef enum _WINSINTF_SCV_OPC_E {
  391. WINSINTF_E_SCV_GENERAL,
  392. WINSINTF_E_SCV_VERIFY
  393. } WINSINTF_SCV_OPC_E, *PWINSINTF_SCV_OPC_E;
  394. //
  395. // To send a scavenge request
  396. //
  397. typedef struct _WINSINTF_SCV_REQ_T {
  398. WINSINTF_SCV_OPC_E Opcode_e;
  399. DWORD Age;
  400. DWORD fForce;
  401. } WINSINTF_SCV_REQ_T, *PWINSINTF_SCV_REQ_T;
  402. typedef enum _DbVersion{
  403. DbVersionMin,
  404. DbVersion351 = 1,
  405. DbVersion4,
  406. DbVersion5,
  407. DbVersionMax
  408. } DbVersion;
  409. /*
  410. * function declarations
  411. */
  412. extern
  413. handle_t
  414. #if !defined(MIDL_PASS)
  415. __RPC_API
  416. #endif // MIDL_PASS
  417. WinsBind(
  418. PWINSINTF_BIND_DATA_T pBindData
  419. );
  420. extern
  421. VOID
  422. #if !defined(MIDL_PASS)
  423. __RPC_API
  424. #endif // MIDL_PASS
  425. WinsUnbind(
  426. PWINSINTF_BIND_DATA_T pBindData,
  427. handle_t BindHdl
  428. );
  429. extern
  430. DWORD
  431. R_WinsRecordAction(
  432. DECLARE_WINS_HANDLE( ServerHdl )
  433. PWINSINTF_RECORD_ACTION_T *ppRecAction
  434. );
  435. extern
  436. DWORD
  437. #if !defined(MIDL_PASS)
  438. __RPC_API
  439. #endif // MIDL_PASS
  440. WinsRecordAction(
  441. DECLARE_WINS_HANDLE( ServerHdl )
  442. PWINSINTF_RECORD_ACTION_T *ppRecAction
  443. );
  444. extern
  445. DWORD
  446. R_WinsStatus(
  447. DECLARE_WINS_HANDLE( ServerHdl )
  448. WINSINTF_CMD_E Cmd_e,
  449. PWINSINTF_RESULTS_T pResults
  450. );
  451. extern
  452. DWORD
  453. #if !defined(MIDL_PASS)
  454. __RPC_API
  455. #endif // MIDL_PASS
  456. WinsStatus(
  457. DECLARE_WINS_HANDLE( ServerHdl )
  458. WINSINTF_CMD_E Cmd_e,
  459. LPVOID pResults
  460. );
  461. extern
  462. DWORD
  463. R_WinsStatusNew(
  464. DECLARE_WINS_HANDLE( ServerHdl )
  465. WINSINTF_CMD_E Cmd_e,
  466. PWINSINTF_RESULTS_NEW_T pResults
  467. );
  468. extern
  469. DWORD
  470. #if !defined(MIDL_PASS)
  471. __RPC_API
  472. #endif // MIDL_PASS
  473. WinsStatusNew(
  474. DECLARE_WINS_HANDLE( ServerHdl )
  475. WINSINTF_CMD_E Cmd_e,
  476. PWINSINTF_RESULTS_NEW_T pResults
  477. );
  478. extern
  479. DWORD
  480. #if !defined(MIDL_PASS)
  481. __RPC_API
  482. #endif // MIDL_PASS
  483. WinsStatusWHdl(
  484. PWINSINTF_BIND_DATA_T pWinsHdl,
  485. WINSINTF_CMD_E Cmd_e,
  486. PWINSINTF_RESULTS_NEW_T pResults
  487. );
  488. extern
  489. DWORD
  490. R_WinsTrigger (
  491. DECLARE_WINS_HANDLE( ServerHdl )
  492. PWINSINTF_ADD_T pWinsAdd,
  493. WINSINTF_TRIG_TYPE_E TrigType_e
  494. );
  495. extern
  496. DWORD
  497. #if !defined(MIDL_PASS)
  498. __RPC_API
  499. #endif // MIDL_PASS
  500. WinsTrigger (
  501. DECLARE_WINS_HANDLE( ServerHdl )
  502. PWINSINTF_ADD_T pWinsAdd,
  503. WINSINTF_TRIG_TYPE_E TrigType_e
  504. );
  505. extern
  506. DWORD
  507. R_WinsDoStaticInit (
  508. DECLARE_WINS_HANDLE( ServerHdl )
  509. LPWSTR pDataFilePath,
  510. DWORD fDel
  511. );
  512. extern
  513. DWORD
  514. #if !defined(MIDL_PASS)
  515. __RPC_API
  516. #endif // MIDL_PASS
  517. WinsDoStaticInit (
  518. DECLARE_WINS_HANDLE( ServerHdl )
  519. LPWSTR pDataFilePath,
  520. DWORD fDel
  521. );
  522. extern
  523. DWORD
  524. R_WinsGetDbRecs (
  525. DECLARE_WINS_HANDLE( ServerHdl )
  526. PWINSINTF_ADD_T pWinsAdd,
  527. WINSINTF_VERS_NO_T MinVersNo,
  528. WINSINTF_VERS_NO_T MaxVersNo,
  529. PWINSINTF_RECS_T pRecs
  530. );
  531. extern
  532. DWORD
  533. #if !defined(MIDL_PASS)
  534. __RPC_API
  535. #endif // MIDL_PASS
  536. WinsGetDbRecs (
  537. DECLARE_WINS_HANDLE( ServerHdl )
  538. PWINSINTF_ADD_T pWinsAdd,
  539. WINSINTF_VERS_NO_T MinVersNo,
  540. WINSINTF_VERS_NO_T MaxVersNo,
  541. PWINSINTF_RECS_T pRecs
  542. );
  543. extern
  544. DWORD
  545. R_WinsGetDbRecsByName (
  546. DECLARE_WINS_HANDLE( ServerHdl )
  547. PWINSINTF_ADD_T pWinsAdd,
  548. DWORD Location,
  549. LPBYTE pName,
  550. DWORD NameLen,
  551. DWORD NoOfRecsDesired,
  552. DWORD TypeOfRecs,
  553. PWINSINTF_RECS_T pRecs
  554. );
  555. extern
  556. DWORD
  557. #if !defined(MIDL_PASS)
  558. __RPC_API
  559. #endif // MIDL_PASS
  560. WinsGetDbRecsByName (
  561. DECLARE_WINS_HANDLE( ServerHdl )
  562. PWINSINTF_ADD_T pWinsAdd,
  563. DWORD Location,
  564. LPBYTE pName,
  565. DWORD NameLen,
  566. DWORD NoOfRecsDesired,
  567. DWORD TypeOfRecs,
  568. PWINSINTF_RECS_T pRecs
  569. );
  570. extern
  571. DWORD
  572. R_WinsDoScavenging (
  573. DECLARE_WINS_HANDLE0( ServerHdl )
  574. );
  575. extern
  576. DWORD
  577. #if !defined(MIDL_PASS)
  578. __RPC_API
  579. #endif // MIDL_PASS
  580. WinsDoScavenging (
  581. DECLARE_WINS_HANDLE0( ServerHdl )
  582. );
  583. extern
  584. DWORD
  585. R_WinsDoScavengingNew (
  586. DECLARE_WINS_HANDLE( ServerHdl )
  587. PWINSINTF_SCV_REQ_T pScvReq
  588. );
  589. extern
  590. DWORD
  591. #if !defined(MIDL_PASS)
  592. __RPC_API
  593. #endif // MIDL_PASS
  594. WinsDoScavengingNew (
  595. DECLARE_WINS_HANDLE( ServerHdl )
  596. PWINSINTF_SCV_REQ_T pScvReq
  597. );
  598. extern
  599. VOID
  600. #if !defined(MIDL_PASS)
  601. __RPC_API
  602. #endif // MIDL_PASS
  603. WinsIntfSetTime(
  604. DECLARE_WINS_HANDLE( ServerHdl )
  605. IN OUT PSYSTEMTIME pTime,
  606. IN WINSINTF_TIME_TYPE_E TimeType_e
  607. );
  608. extern
  609. DWORD
  610. R_WinsTerm (
  611. handle_t ServerHdl,
  612. IN short fAbruptTerm
  613. );
  614. extern
  615. DWORD
  616. #if !defined(MIDL_PASS)
  617. __RPC_API
  618. #endif // MIDL_PASS
  619. WinsTerm (
  620. handle_t ServerHdl,
  621. IN short fAbruptTerm
  622. );
  623. extern
  624. DWORD
  625. R_WinsBackup (
  626. DECLARE_WINS_HANDLE( ServerHdl )
  627. IN LPBYTE pBackupPath,
  628. IN short fIncremental
  629. );
  630. extern
  631. DWORD
  632. #if !defined(MIDL_PASS)
  633. __RPC_API
  634. #endif // MIDL_PASS
  635. WinsBackup (
  636. DECLARE_WINS_HANDLE( ServerHdl )
  637. IN LPBYTE pBackupPath,
  638. IN short fIncremental
  639. );
  640. extern
  641. DWORD
  642. R_WinsDelDbRecs (
  643. DECLARE_WINS_HANDLE( ServerHdl )
  644. PWINSINTF_ADD_T pWinsAdd,
  645. WINSINTF_VERS_NO_T MinVersNo,
  646. WINSINTF_VERS_NO_T MaxVersNo
  647. );
  648. extern
  649. DWORD
  650. #if !defined(MIDL_PASS)
  651. __RPC_API
  652. #endif // MIDL_PASS
  653. WinsDelDbRecs (
  654. DECLARE_WINS_HANDLE( ServerHdl )
  655. PWINSINTF_ADD_T pWinsAdd,
  656. WINSINTF_VERS_NO_T MinVersNo,
  657. WINSINTF_VERS_NO_T MaxVersNo
  658. );
  659. extern
  660. DWORD
  661. R_WinsPullRange (
  662. DECLARE_WINS_HANDLE( ServerHdl )
  663. PWINSINTF_ADD_T pWinsAdd,
  664. PWINSINTF_ADD_T pOwnAdd,
  665. WINSINTF_VERS_NO_T MinVersNo,
  666. WINSINTF_VERS_NO_T MaxVersNo
  667. );
  668. extern
  669. DWORD
  670. #if !defined(MIDL_PASS)
  671. __RPC_API
  672. #endif // MIDL_PASS
  673. WinsPullRange (
  674. DECLARE_WINS_HANDLE( ServerHdl )
  675. PWINSINTF_ADD_T pWinsAdd,
  676. PWINSINTF_ADD_T pOwnAdd,
  677. WINSINTF_VERS_NO_T MinVersNo,
  678. WINSINTF_VERS_NO_T MaxVersNo
  679. );
  680. extern
  681. DWORD
  682. R_WinsSetPriorityClass (
  683. DECLARE_WINS_HANDLE( ServerHdl )
  684. IN WINSINTF_PRIORITY_CLASS_E PrCls_e
  685. );
  686. extern
  687. DWORD
  688. #if !defined(MIDL_PASS)
  689. __RPC_API
  690. #endif // MIDL_PASS
  691. WinsSetPriorityClass (
  692. DECLARE_WINS_HANDLE( ServerHdl )
  693. IN WINSINTF_PRIORITY_CLASS_E PrCls_e
  694. );
  695. extern
  696. DWORD
  697. R_WinsResetCounters (
  698. DECLARE_WINS_HANDLE0( ServerHdl )
  699. );
  700. extern
  701. DWORD
  702. #if !defined(MIDL_PASS)
  703. __RPC_API
  704. #endif // MIDL_PASS
  705. WinsResetCounters (
  706. DECLARE_WINS_HANDLE0( ServerHdl )
  707. );
  708. extern
  709. DWORD
  710. R_WinsWorkerThdUpd (
  711. DECLARE_WINS_HANDLE( ServerHdl )
  712. DWORD NewNoOfNbtThds
  713. );
  714. extern
  715. DWORD
  716. #if !defined(MIDL_PASS)
  717. __RPC_API
  718. #endif // MIDL_PASS
  719. WinsWorkerThdUpd (
  720. DECLARE_WINS_HANDLE( ServerHdl )
  721. DWORD NewNoOfNbtThds
  722. );
  723. extern
  724. DWORD
  725. WinsRestore (
  726. LPBYTE BackupPath
  727. );
  728. extern
  729. DWORD
  730. WinsRestoreEx (
  731. LPBYTE BackupPath ,
  732. DbVersion Version
  733. );
  734. extern
  735. DWORD
  736. #if !defined(MIDL_PASS)
  737. __RPC_API
  738. #endif // MIDL_PASS
  739. WinsSyncUp (
  740. DECLARE_WINS_HANDLE( ServerHdl )
  741. PWINSINTF_ADD_T pWinsAdd,
  742. PWINSINTF_ADD_T pOwnAdd
  743. );
  744. extern
  745. DWORD
  746. R_WinsGetNameAndAdd(
  747. DECLARE_WINS_HANDLE( ServerHdl )
  748. PWINSINTF_ADD_T pWinsAdd,
  749. LPBYTE pUncName
  750. );
  751. extern
  752. DWORD
  753. #if !defined(MIDL_PASS)
  754. __RPC_API
  755. #endif // MIDL_PASS
  756. WinsGetNameAndAdd(
  757. DECLARE_WINS_HANDLE( ServerHdl )
  758. PWINSINTF_ADD_T pWinsAdd,
  759. LPBYTE pUncName
  760. );
  761. extern
  762. DWORD
  763. #if !defined(MIDL_PASS)
  764. __RPC_API
  765. #endif // MIDL_PASS
  766. WinsGetBrowserNames(
  767. PWINSINTF_BIND_DATA_T pWinsHdl,
  768. PWINSINTF_BROWSER_NAMES_T pNames
  769. );
  770. extern
  771. VOID
  772. R_WinsGetBrowserNames_notify(
  773. DECLARE_WINS_HANDLE0( ServerHdl )
  774. );
  775. extern
  776. DWORD
  777. #if !defined(MIDL_PASS)
  778. __RPC_API
  779. #endif // MIDL_PASS
  780. WinsGetBrowserNames_Old(
  781. DECLARE_WINS_HANDLE( ServerHdl )
  782. PWINSINTF_BROWSER_NAMES_T pNames
  783. );
  784. extern
  785. DWORD
  786. R_WinsDeleteWins(
  787. DECLARE_WINS_HANDLE( ServerHdl )
  788. PWINSINTF_ADD_T pWinsAdd
  789. );
  790. extern
  791. DWORD
  792. R_WinsSetFlags(
  793. DECLARE_WINS_HANDLE( ServerHdl )
  794. DWORD fFlags
  795. );
  796. extern
  797. DWORD
  798. #if !defined(MIDL_PASS)
  799. __RPC_API
  800. #endif // MIDL_PASS
  801. WinsSetFlags(
  802. DECLARE_WINS_HANDLE( ServerHdl )
  803. DWORD fFlags
  804. );
  805. extern
  806. DWORD
  807. #if !defined(MIDL_PASS)
  808. __RPC_API
  809. #endif // MIDL_PASS
  810. WinsDeleteWins(
  811. DECLARE_WINS_HANDLE( ServerHdl )
  812. PWINSINTF_ADD_T pWinsAdd
  813. );
  814. extern
  815. void
  816. #if !defined(MIDL_PASS)
  817. __RPC_FAR * __RPC_API
  818. //void * __RPC_API
  819. //void *
  820. #endif // MIDL_PASS
  821. midl_user_allocate(size_t cBytes);
  822. extern
  823. //void __RPC_FAR * __RPC_API
  824. void
  825. #if !defined(MIDL_PASS)
  826. __RPC_API
  827. #endif // MIDL_PASS
  828. //void
  829. //midl_user_free(void __RPC_FAR *pMem);
  830. midl_user_free(void *pMem);
  831. extern
  832. VOID
  833. #if !defined(MIDL_PASS)
  834. __RPC_API
  835. #endif // MIDL_PASS
  836. WinsFreeMem(LPVOID pMem);
  837. extern
  838. LPVOID
  839. #if !defined(MIDL_PASS)
  840. __RPC_API
  841. #endif // MIDL_PASS
  842. WinsAllocMem(size_t cBytes);
  843. typedef struct _TREE_T {
  844. #if defined(MIDL_PASS)
  845. [unique] struct _TREE_T *fPtr;
  846. [ignore, unique] struct _TREE_T *bPtr;
  847. [unique, size_is(NameLen)] LPBYTE pName;
  848. #else
  849. struct _TREE_T *fPtr;
  850. struct _TREE_T *bPtr;
  851. LPBYTE pName;
  852. #endif
  853. unsigned short NameLen;
  854. DWORD x;
  855. } TREE_T, *PTREE_T;
  856. extern
  857. DWORD
  858. R_WinsTombstoneDbRecs (
  859. WINSIF2_HANDLE ServerHdl,
  860. PWINSINTF_ADD_T pWinsAdd,
  861. WINSINTF_VERS_NO_T MinVersNo,
  862. WINSINTF_VERS_NO_T MaxVersNo
  863. );
  864. extern
  865. DWORD
  866. #if !defined(MIDL_PASS)
  867. __RPC_API
  868. #endif // MIDL_PASS
  869. WinsTombstoneDbRecs (
  870. DECLARE_WINS_HANDLE (ServerHdl)
  871. PWINSINTF_ADD_T pWinsAdd,
  872. WINSINTF_VERS_NO_T MinVersNo,
  873. WINSINTF_VERS_NO_T MaxVersNo
  874. );
  875. extern
  876. DWORD
  877. R_WinsCheckAccess(
  878. WINSIF2_HANDLE ServerHdl,
  879. DWORD *Access
  880. );
  881. extern
  882. DWORD
  883. #if !defined(MIDL_PASS)
  884. __RPC_API
  885. #endif // MIDL_PASS
  886. WinsCheckAccess(
  887. WINSIF2_HANDLE ServerHdl,
  888. DWORD *Access
  889. );
  890. #endif