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.

835 lines
25 KiB

  1. /*++ BUILD Version: 0001 Increment if a change has global effects
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. ntfrsapi.h
  5. Abstract:
  6. Header file for the application programmer's interfaces to the
  7. File Replication Service (NtFrs) that support they system volumes
  8. and DC Promotion / Demotion.
  9. Environment:
  10. User Mode - Win32
  11. Notes:
  12. --*/
  13. #ifndef _NTFRSAPI_H_
  14. #define _NTFRSAPI_H_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. // Pull in public headers for compat.
  20. //
  21. #include <frsapip.h>
  22. //
  23. // If a file or dir create has a name that starts with the following GUID
  24. // then FRS does not replicate the created file or dir. Note: For dirs
  25. // this means that the directory is never entered in the FRS directory filter
  26. // table so FRS will never replicate the dir (even after it is renamed) or
  27. // any changes to the dir (like ACLs or added streams or attrib changes) or
  28. // any children created under the dir.
  29. //
  30. #define NTFRS_REPL_SUPPRESS_PREFIX L"2ca04e7e-44c8-4076-8890a424b8ad193e"
  31. DWORD
  32. WINAPI
  33. NtFrsApi_PrepareForPromotionW(
  34. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  35. );
  36. /*++
  37. Routine Description:
  38. The NtFrs service seeds the system volume during the promotion
  39. of a server to a Domain Controller (DC). The files and directories
  40. for the system volume come from the same machine that is supplying
  41. the initial Directory Service (DS).
  42. This function prepares the NtFrs service on this machine for
  43. promotion by stopping the service, deleting old promotion
  44. state in the registry, and restarting the service.
  45. This function is not idempotent and isn't MT safe.
  46. Arguments:
  47. None.
  48. Return Value:
  49. Win32 Status
  50. --*/
  51. DWORD
  52. WINAPI
  53. NtFrsApi_PrepareForDemotionUsingCredW(
  54. IN SEC_WINNT_AUTH_IDENTITY *Credentials, OPTIONAL
  55. IN HANDLE ClientToken,
  56. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  57. );
  58. /*++
  59. Routine Description:
  60. The NtFrs service replicates the enterprise system volume to all
  61. Domain Controllers (DCs) and replicates the domain system volume
  62. to the DCs in a domain until the DC is demoted to a member server.
  63. Replication is stopped by tombstoning the system volume's replica
  64. set.
  65. This function prepares the NtFrs service on this machine for
  66. demotion by stopping the service, deleting old demotion
  67. state in the registry, and restarting the service.
  68. This function is not idempotent and isn't MT safe.
  69. Arguments:
  70. Credentials -- Credentionals to use in ldap binding call, if supplied.
  71. ClientToken -- Impersonation token to use if no Credentials supplied.
  72. Return Value:
  73. Win32 Status
  74. --*/
  75. DWORD
  76. WINAPI
  77. NtFrsApi_PrepareForDemotionW(
  78. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  79. );
  80. /*++
  81. Routine Description:
  82. The NtFrs service replicates the enterprise system volume to all
  83. Domain Controllers (DCs) and replicates the domain system volume
  84. to the DCs in a domain until the DC is demoted to a member server.
  85. Replication is stopped by tombstoning the system volume's replica
  86. set.
  87. This function prepares the NtFrs service on this machine for
  88. demotion by stopping the service, deleting old demotion
  89. state in the registry, and restarting the service.
  90. This function is not idempotent and isn't MT safe.
  91. Arguments:
  92. None.
  93. Return Value:
  94. Win32 Status
  95. --*/
  96. #define NTFRSAPI_SERVICE_STATE_IS_UNKNOWN (00)
  97. #define NTFRSAPI_SERVICE_PROMOTING (10)
  98. #define NTFRSAPI_SERVICE_DEMOTING (20)
  99. #define NTFRSAPI_SERVICE_DONE (99)
  100. DWORD
  101. WINAPI
  102. NtFrsApi_StartPromotionW(
  103. IN PWCHAR ParentComputer, OPTIONAL
  104. IN PWCHAR ParentAccount, OPTIONAL
  105. IN PWCHAR ParentPassword, OPTIONAL
  106. IN DWORD DisplayCallBack(IN PWCHAR Display), OPTIONAL
  107. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG), OPTIONAL
  108. IN PWCHAR ReplicaSetName,
  109. IN PWCHAR ReplicaSetType,
  110. IN DWORD ReplicaSetPrimary,
  111. IN PWCHAR ReplicaSetStage,
  112. IN PWCHAR ReplicaSetRoot
  113. );
  114. /*++
  115. Routine Description:
  116. The NtFrs service seeds the system volume during the promotion
  117. of a server to a Domain Controller (DC). The files and directories
  118. for the system volume come from the same machine that is supplying
  119. the initial Directory Service (DS).
  120. This function kicks off a thread that updates the sysvol information
  121. in the registry and initiates the seeding process. The thread tracks
  122. the progress of the seeding and periodically informs the caller.
  123. The threads started by NtFrsApi_StartPromotionW can be forcefully
  124. terminated with NtFrsApi_AbortPromotionW.
  125. The threads started by NtFrsApi_StartPromotionW can be waited on
  126. with NtFrsApi_WaitForPromotionW.
  127. Arguments:
  128. ParentComputer - An RPC-bindable name of the computer that is
  129. supplying the Directory Service (DS) with its
  130. initial state. The files and directories for
  131. the system volume are replicated from this
  132. parent computer.
  133. ParentAccount - A logon account on ParentComputer.
  134. ParentPassword - The logon account's password on ParentComputer.
  135. DisplayCallBack - Called periodically with a progress display.
  136. ReplicaSetName - Name of the replica set.
  137. ReplicaSetType - Type of replica set (enterprise or domain)
  138. ReplicaSetPrimary - Is this the primary member of the replica set?
  139. - 1 = primary; 0 = not.
  140. ReplicaSetStage - Staging path.
  141. ReplicaSetRoot - Root path.
  142. Return Value:
  143. Win32 Status
  144. --*/
  145. DWORD
  146. WINAPI
  147. NtFrsApi_StartDemotionW(
  148. IN PWCHAR ReplicaSetName,
  149. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  150. );
  151. /*++
  152. Routine Description:
  153. The NtFrs service replicates the enterprise system volume to all
  154. Domain Controllers (DCs) and replicates the domain system volume
  155. to the DCs in a domain until the DC is demoted to a member server.
  156. Replication is stopped by tombstoning the system volume's replica
  157. set.
  158. This function kicks off a thread that stops replication of the
  159. system volume on this machine by telling the NtFrs service on
  160. this machine to tombstone the system volume's replica set.
  161. The threads started by NtFrsApi_StartDemotionW can be forcefully
  162. terminated with NtFrsApi_AbortDemotionW.
  163. The threads started by NtFrsApi_StartDemotionW can be waited on
  164. with NtFrsApi_WaitForDemotionW.
  165. Arguments:
  166. ReplicaSetName - Name of the replica set.
  167. Return Value:
  168. Win32 Status
  169. --*/
  170. DWORD
  171. WINAPI
  172. NtFrsApi_WaitForPromotionW(
  173. IN DWORD TimeoutInMilliSeconds,
  174. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  175. );
  176. /*++
  177. Routine Description:
  178. The NtFrs service seeds the system volume during the promotion
  179. of a server to a Domain Controller (DC). The files and directories
  180. for the system volume come from the same machine that is supplying
  181. the initial Directory Service (DS).
  182. This function waits for the seeding to finish or to stop w/error.
  183. Arguments:
  184. TimeoutInMilliSeconds - Timeout in milliseconds for waiting for
  185. seeding to finish. INFINITE if no timeout.
  186. Return Value:
  187. Win32 Status
  188. --*/
  189. DWORD
  190. WINAPI
  191. NtFrsApi_WaitForDemotionW(
  192. IN DWORD TimeoutInMilliSeconds,
  193. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  194. );
  195. /*++
  196. Routine Description:
  197. The NtFrs service replicates the enterprise system volume to all
  198. Domain Controllers (DCs) and replicates the domain system volume
  199. to the DCs in a domain until the DC is demoted to a member server.
  200. Replication is stopped by tombstoning the system volume's replica
  201. set.
  202. This function waits for the tombstoning to finish or to stop w/error.
  203. Arguments:
  204. TimeoutInMilliSeconds - Timeout in milliseconds for waiting for
  205. seeding to finish. INFINITE if no timeout.
  206. Return Value:
  207. Win32 Status
  208. --*/
  209. DWORD
  210. WINAPI
  211. NtFrsApi_CommitPromotionW(
  212. IN DWORD TimeoutInMilliSeconds,
  213. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  214. );
  215. /*++
  216. Routine Description:
  217. WARNING - This function assumes the caller will reboot the system
  218. soon after this call!
  219. The NtFrs service seeds the system volume during the promotion
  220. of a server to a Domain Controller (DC). The files and directories
  221. for the system volume come from the same machine that is supplying
  222. the initial Directory Service (DS).
  223. This function waits for the seeding to finish, stops the service,
  224. and commits the state in the registry. On reboot, the NtFrs Service
  225. updates the DS on this machine with the information in the registry.
  226. Arguments:
  227. TimeoutInMilliSeconds - Timeout in milliseconds for waiting for
  228. seeding to finish. INFINITE if no timeout.
  229. Return Value:
  230. Win32 Status
  231. --*/
  232. DWORD
  233. WINAPI
  234. NtFrsApi_CommitDemotionW(
  235. IN DWORD TimeoutInMilliSeconds,
  236. IN DWORD ErrorCallBack(IN PWCHAR, IN ULONG) OPTIONAL
  237. );
  238. /*++
  239. Routine Description:
  240. WARNING - This function assumes the caller will reboot the system
  241. soon after this call!
  242. The NtFrs service replicates the enterprise system volume to all
  243. Domain Controllers (DCs) and replicates the domain system volume
  244. to the DCs in a domain until the DC is demoted to a member server.
  245. Replication is stopped by tombstoning the system volume's replica
  246. set.
  247. This function waits for the tombstoning to finish, tells the service
  248. to forcibly delete the system volumes' replica sets, stops the service,
  249. and commits the state in the registry. On reboot, the NtFrs Service
  250. updates the DS on this machine with the information in the registry.
  251. Arguments:
  252. TimeoutInMilliSeconds - Timeout in milliseconds for waiting for
  253. tombstoning to finish. INFINITE if no timeout.
  254. Return Value:
  255. Win32 Status
  256. --*/
  257. DWORD
  258. WINAPI
  259. NtFrsApi_AbortPromotionW(
  260. VOID
  261. );
  262. /*++
  263. Routine Description:
  264. The NtFrs service seeds the system volume during the promotion
  265. of a server to a Domain Controller (DC). The files and directories
  266. for the system volume come from the same machine that is supplying
  267. the initial Directory Service (DS).
  268. This function aborts the seeding process by stopping the service,
  269. deleting the promotion state out of the registry, cleaning up
  270. the active threads and the active RPC calls, and finally resetting
  271. the service to its pre-seeding state.
  272. Arguments:
  273. None.
  274. Return Value:
  275. Win32 Status
  276. --*/
  277. DWORD
  278. WINAPI
  279. NtFrsApi_AbortDemotionW(
  280. VOID
  281. );
  282. /*++
  283. Routine Description:
  284. The NtFrs service replicates the enterprise system volume to all
  285. Domain Controllers (DCs) and replicates the domain system volume
  286. to the DCs in a domain until the DC is demoted to a member server.
  287. During demotion, NtFrsApi_StartDemotionW stops replication of
  288. the system volume on this machine by telling the NtFrs service
  289. on this machine to tombstone the system volume's replica set.
  290. This function aborts the tombstoning process by stopping the service,
  291. deleting the demotion state out of the registry, cleaning up
  292. the active threads and the active RPC calls, and finally resetting
  293. the service to its pre-tombstoning state.
  294. Arguments:
  295. None.
  296. Return Value:
  297. Win32 Status
  298. --*/
  299. //
  300. // Type of internal information returned by NtFrsApi_InfoW()
  301. //
  302. #define NTFRSAPI_INFO_TYPE_MIN (0)
  303. #define NTFRSAPI_INFO_TYPE_VERSION (0)
  304. #define NTFRSAPI_INFO_TYPE_SETS (1)
  305. #define NTFRSAPI_INFO_TYPE_DS (2)
  306. #define NTFRSAPI_INFO_TYPE_MEMORY (3)
  307. #define NTFRSAPI_INFO_TYPE_IDTABLE (4)
  308. #define NTFRSAPI_INFO_TYPE_OUTLOG (5)
  309. #define NTFRSAPI_INFO_TYPE_INLOG (6)
  310. #define NTFRSAPI_INFO_TYPE_THREADS (7)
  311. #define NTFRSAPI_INFO_TYPE_STAGE (8)
  312. #define NTFRSAPI_INFO_TYPE_CONFIGTABLE (9)
  313. #define NTFRSAPI_INFO_TYPE_MAX (10)
  314. //
  315. // FRS Writer commands. freeze freezes the frs service
  316. // thaw releases frozen command servers.
  317. // FRS guarantees that snapshots taken while
  318. // FRS is in frozen state will not have partial files.
  319. //
  320. #define NTFRSAPI_WRITER_COMMAND_FREEZE (1)
  321. #define NTFRSAPI_WRITER_COMMAND_THAW (2)
  322. #define NTFRSAPI_WRITER_COMMAND_MAX (3)
  323. //
  324. // Internal constants
  325. //
  326. //
  327. // NTFRSAPI_DEFAULT_INFO_SIZE must not be larger than range specified
  328. // in frsapi.idl
  329. //
  330. #define NTFRSAPI_DEFAULT_INFO_SIZE (64 * 1024)
  331. #define NTFRSAPI_MINIMUM_INFO_SIZE ( 1 * 1024)
  332. //
  333. // Opaque information from NtFrs.
  334. // Parse with NtFrsApi_InfoLineW().
  335. // Free with NtFrsApi_InfoFreeW();
  336. //
  337. typedef struct _NTFRSAPI_INFO {
  338. ULONG Major; // Major rev of ntfrsapi.dll
  339. ULONG Minor; // Minor rev of ntfrsapi.dll
  340. ULONG NtFrsMajor; // Major rev of NtFrs service.
  341. ULONG NtFrsMinor; // Minor rev of NtFrs service.
  342. ULONG SizeInChars; // Size of this struct.
  343. ULONG Flags; //
  344. ULONG TypeOfInfo; // Info type code above.
  345. ULONG TotalChars; // Cumulative chars returned.
  346. ULONG CharsToSkip; // Chars to skip over in the next call.
  347. ULONG OffsetToLines; // Offset to start of returned data.
  348. ULONG OffsetToFree; // Offset to next free byte in this struct.
  349. CHAR Lines[1]; // Start of var len return data buffer.
  350. } NTFRSAPI_INFO, *PNTFRSAPI_INFO;
  351. //
  352. // RPC Blob must be at least this size so we can check Major/Minor rev and
  353. // buffer size parameters.
  354. //
  355. #define NTFRSAPI_INFO_HEADER_SIZE (5 * sizeof(ULONG))
  356. //
  357. // NtFrsApi Information Flags
  358. //
  359. // Returned Version info is valid.
  360. //
  361. #define NTFRSAPI_INFO_FLAGS_VERSION (0x00000001)
  362. //
  363. // Returned data buffer is full.
  364. //
  365. #define NTFRSAPI_INFO_FLAGS_FULL (0x00000002)
  366. DWORD
  367. WINAPI
  368. NtFrsApi_InfoW(
  369. IN PWCHAR ComputerName, OPTIONAL
  370. IN ULONG TypeOfInfo,
  371. IN ULONG SizeInChars,
  372. IN OUT PVOID *NtFrsApiInfo
  373. );
  374. /*++
  375. Routine Description:
  376. Return a buffer full of the requested information. The information
  377. can be extracted from the buffer with NtFrsApi_InfoLineW().
  378. *NtFrsApiInfo should be NULL on the first call. On subsequent calls,
  379. *NtFrsApiInfo will be filled in with more data if any is present.
  380. Otherwise, *NtFrsApiInfo is set to NULL and the memory is freed.
  381. The SizeInChars is a suggested size; the actual memory usage
  382. may be different. The function chooses the memory usage if
  383. SizeInChars is 0.
  384. The format of the returned information can change without notice.
  385. Arguments:
  386. ComputerName - Poke the service on this computer. The computer
  387. name can be any RPC-bindable name. Usually, the
  388. NetBIOS or DNS name works just fine. The NetBIOS
  389. name can be found with GetComputerName() or
  390. hostname. The DNS name can be found with
  391. gethostbyname() or ipconfig /all. If NULL, the
  392. service on this computer is contacted. The service
  393. is contacted using Secure RPC.
  394. TypeOfInfo - See the constants beginning with NTFRSAPI_INFO_
  395. in ntfrsapi.h.
  396. SizeInChars - Suggested memory usage; actual may be different.
  397. 0 == Function chooses memory usage
  398. NtFrsApiInfo - Opaque. Parse with NtFrsApi_InfoLineW().
  399. Free with NtFrsApi_InfoFreeW();
  400. Return Value:
  401. Win32 Status
  402. --*/
  403. DWORD
  404. WINAPI
  405. NtFrsApi_InfoLineW(
  406. IN PNTFRSAPI_INFO NtFrsApiInfo,
  407. IN OUT PVOID *InOutLine
  408. );
  409. /*++
  410. Routine Description:
  411. Extract the wchar lines of information from NtFrsApiInformation.
  412. Returns the address of the next L'\0' terminated line of information.
  413. NULL if none.
  414. Arguments:
  415. NtFrsApiInfo - Opaque. Returned by NtFrsApi_InfoW().
  416. Parse with NtFrsApi_InfoLineW().
  417. Free with NtFrsApi_InfoFreeW().
  418. Return Value:
  419. Win32 Status
  420. --*/
  421. BOOL
  422. WINAPI
  423. NtFrsApi_InfoMoreW(
  424. IN PNTFRSAPI_INFO NtFrsApiInfo
  425. );
  426. /*++
  427. Routine Description:
  428. All of the information may not have fit in the buffer. The additional
  429. information can be fetched by calling NtFrsApi_InfoW() again with the
  430. same NtFrsApiInfo struct. NtFrsApi_InfoW() will return NULL in
  431. NtFrsApiInfo if there is no more information.
  432. However, the information returned in subsequent calls to _InfoW() may be
  433. out of sync with the previous information. If the user requires a
  434. coherent information set, then the information buffer should be freed
  435. with NtFrsApi_InfoFreeW() and another call made to NtFrsApi_InfoW()
  436. with an increased SizeInChars. Repeat the procedure until
  437. NtFrsApi_InfoMoreW() returns FALSE.
  438. Arguments:
  439. NtFrsApiInfo - Opaque. Returned by NtFrsApi_InfoW().
  440. Parse with NtFrsApi_InfoLineW().
  441. Free with NtFrsApi_InfoFreeW().
  442. Return Value:
  443. TRUE - The information buffer does *NOT* contain all of the info.
  444. FALSE - The information buffer does contain all of the info.
  445. --*/
  446. DWORD
  447. WINAPI
  448. NtFrsApi_InfoFreeW(
  449. IN PVOID *NtFrsApiInfo
  450. );
  451. /*++
  452. Routine Description:
  453. Free the information buffer allocated by NtFrsApi_InfoW();
  454. Arguments:
  455. NtFrsApiInfo - Opaque. Returned by NtFrsApi_InfoW().
  456. Parse with NtFrsApi_InfoLineW().
  457. Free with NtFrsApi_InfoFreeW().
  458. Return Value:
  459. Win32 Status
  460. --*/
  461. DWORD
  462. WINAPI
  463. NtFrsApi_DeleteSysvolMember(
  464. IN PSEC_WINNT_AUTH_IDENTITY_W pCreds,
  465. IN PWCHAR BindingDC,
  466. IN PWCHAR NTDSSettingsDn,
  467. IN OPTIONAL PWCHAR ComputerDn
  468. );
  469. /*++
  470. Routine Description:
  471. This API is written to be called from NTDSUTIL.EXE to remove
  472. FRS member and subscriber object for a server that is being
  473. removed (without dcpromo-demote) from the list of DCs.
  474. Arguments:
  475. pCreds p Credentials used to bind to the DS.
  476. BindingDC - Name of a DC to perform the delete on.
  477. NTDSSettingsDn - Dn of the "NTDS Settings" object for the server
  478. that is being removed from the sysvol replica set.
  479. ComputerDn - Dn of the computer object for the server that is
  480. being removed from the sysvol replica set.
  481. Return Value:
  482. Win32 Status
  483. --*/
  484. //
  485. // ReplicaSetType -- (From Frs-Replica-Set-Type in NTFRS-Replica-Set Object)
  486. //
  487. #define FRS_RSTYPE_ENTERPRISE_SYSVOL 1 // This replica set is enterprise system volume
  488. #define FRS_RSTYPE_DOMAIN_SYSVOL 2 // This replica set is domain system volume
  489. #define FRS_RSTYPE_DFS 3 // A DFS alternate set
  490. #define FRS_RSTYPE_OTHER 4 // None of the above.
  491. DWORD
  492. WINAPI
  493. NtFrsApi_IsPathReplicated(
  494. IN OPTIONAL PWCHAR ComputerName,
  495. IN PWCHAR Path,
  496. IN ULONG ReplicaSetTypeOfInterest,
  497. OUT BOOL *Replicated,
  498. OUT ULONG *Primary,
  499. OUT BOOL *Root,
  500. OUT GUID *ReplicaSetGuid
  501. );
  502. /*++
  503. Routine Description:
  504. Checks if the Path given is part of a replica set of type
  505. ReplicaSetTypeOfInterest. If ReplicaSetTypeOfInterest is 0, will match for
  506. any replica set type.On successful execution the OUT parameters are set as
  507. follows:
  508. Replicated == TRUE iff Path is part of a replica set of type
  509. ReplicaSetTypeOfInterest
  510. Primary == 0 if this machine is not the primary for the replica set
  511. 1 if this machine is the primary for the replica set
  512. 2 if there is no primary for the replica set
  513. Root == TRUE iff Path is the root path for the replica
  514. Arguments:
  515. ComputerName - Bind to the service on this computer. The computer
  516. name can be any RPC-bindable name. Usually, the
  517. NetBIOS or DNS name works just fine. The NetBIOS
  518. name can be found with GetComputerName() or
  519. hostname. The DNS name can be found with
  520. gethostbyname() or ipconfig /all. If NULL, the
  521. service on this computer is contacted.
  522. Path - the local path to check
  523. ReplicaSetTypeOfInterest - The type of replica set to match against. Set to
  524. 0 to match any replica set.
  525. Replicated - set TRUE iff Path is part of a replica set of type
  526. ReplicaSetTypeOfInterest.
  527. If Replicated is FALSE, the other OUT parameters are not set.
  528. Primary - set to 0 if this machine is not the primary for the replica set
  529. 1 if this machine is the primary for the replica set
  530. 2 if there is no primary for the replica set
  531. Root - set TRUE iff Path is the root path for the replica.
  532. ReplicaSetGuid - GUID of the matching replica set.
  533. Return Value:
  534. Win32 Status
  535. --*/
  536. DWORD
  537. WINAPI
  538. NtFrsApi_WriterCommand(
  539. IN OPTIONAL PWCHAR ComputerName,
  540. IN ULONG Command
  541. );
  542. /*++
  543. Routine Description:
  544. Arguments:
  545. ComputerName - Bind to the service on this computer. The computer
  546. name can be any RPC-bindable name. Usually, the
  547. NetBIOS or DNS name works just fine. The NetBIOS
  548. name can be found with GetComputerName() or
  549. hostname. The DNS name can be found with
  550. gethostbyname() or ipconfig /all. If NULL, the
  551. service on this computer is contacted.
  552. Command - Freeze and thaw commands.
  553. Return Value:
  554. Win32 Status
  555. --*/
  556. DWORD
  557. WINAPI
  558. NtFrsApiGetBackupRestoreSetType(
  559. IN PVOID BurContext,
  560. IN PVOID BurSet,
  561. OUT PWCHAR SetType,
  562. IN OUT DWORD *SetTypeSizeInBytes
  563. );
  564. /*++
  565. Routine Description:
  566. Return the type of the replica set. The type is
  567. returned as a string. The types are defined in the
  568. frsapip.h file.
  569. Arguments:
  570. BurContext - From NtFrsApiInitializeBackupRestore()
  571. BurSet - Opaque struct representing a replicating directory.
  572. Returned by NtFrsApiEnumBackupRestoreSets(). Not
  573. valid across calls to NtFrsApiGetBackupRestoreSets().
  574. SetType - type of the replica set in a string format.
  575. SetTypeSizeInBytes - Length of the passed in buffer.
  576. Return Value:
  577. ERROR_MORE_DATE - If the passed in buffer is not big enough
  578. to hold the type. SetTypeSizeInBytes is set
  579. to the size of buffer required.
  580. ERROR_INVALID_PARAMETER - Parameter validation.
  581. ERROR_NOT_FOUND - If passed in set is not found in the context
  582. or if it does not have a type specified in
  583. the registry.
  584. ERROR_SUCCESS - When everything goes fine. SetTypeSizeInBytes
  585. returns the number of bytes written to the
  586. buffer.
  587. Win32 Status
  588. --*/
  589. DWORD
  590. WINAPI
  591. NtFrsApiGetBackupRestoreSetGuid(
  592. IN PVOID BurContext,
  593. IN PVOID BurSet,
  594. OUT PWCHAR SetGuid,
  595. IN OUT DWORD *SetGuidSizeInBytes
  596. );
  597. /*++
  598. Routine Description:
  599. Return the type of the replica set. The type is
  600. returned as a string. The types are defined in the
  601. frsapip.h file.
  602. Arguments:
  603. BurContext - From NtFrsApiInitializeBackupRestore()
  604. BurSet - Opaque struct representing a replicating directory.
  605. Returned by NtFrsApiEnumBackupRestoreSets(). Not
  606. valid across calls to NtFrsApiGetBackupRestoreSets().
  607. SetGuid - Guid of the replica set in a string format.
  608. SetGuidSizeInBytes - Length of the passed in buffer.
  609. Return Value:
  610. ERROR_MORE_DATE - If the passed in buffer is not big enough
  611. to hold the guid. SetGuidSizeInBytes is set
  612. to the size of buffer required.
  613. ERROR_INVALID_PARAMETER - Parameter validation.
  614. ERROR_NOT_FOUND - If passed in set is not found in the context.
  615. ERROR_SUCCESS - When everything goes fine. SetGuidSizeInBytes
  616. returns the number of bytes written to the
  617. buffer.
  618. Win32 Status
  619. --*/
  620. #ifdef __cplusplus
  621. }
  622. #endif
  623. #endif _NTFRSAPI_H_