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.

661 lines
21 KiB

  1. //
  2. //
  3. // Copyright (c) 1995-1996 Microsoft Corporation
  4. //
  5. // Module Name:
  6. //
  7. // crsapi.h
  8. //
  9. // Abstract:
  10. //
  11. // This module defines the common structures and prototypes for the
  12. // Content Replication Service API.
  13. //
  14. // Revision History:
  15. //
  16. #ifndef CRSAPI_INCLUDED
  17. #define CRSAPI_INCLUDED
  18. #if defined(STATIC_REX)
  19. #define CRSAPI
  20. #elif defined(IN_CRSDLL)
  21. #define CRSAPI __declspec( dllexport ) _stdcall
  22. #else
  23. #define CRSAPI __declspec( dllimport) _stdcall
  24. #endif //IN_DLL
  25. #define MAX_PROJECT 100
  26. #define MAX_LOCATION 300
  27. #define MAX_DESTINATION_BUFFER 0x1000
  28. #ifndef WIN32_LEAN_AND_MEAN
  29. #define WIN32_LEAN_AND_MEAN
  30. #endif
  31. #include <windows.h>
  32. #define NOREF(x) x=x
  33. // @DOC
  34. #define RF_NO_DELETE 1
  35. #define RF_REPLICATE_ACLS (1 << 1)
  36. #define RF_NO_DATA (1 << 2)
  37. #define RF_FORCE_REPL (1 << 3)
  38. #define RF_PERMIT_TREE (1 << 4)
  39. #define RF_IN_PROC (1 << 5)
  40. #define RF_INCREMENTAL (1 << 6)
  41. #define RF_FASTMODE (1 << 7)
  42. #define RF_ON_DIR_CHANGE (1 << 8)
  43. #define RF_AUTO_ROUTE (1 << 9)
  44. #define RF_ON_NOTIFY (1 << 10)
  45. #define RF_NO_CHAIN (1 << 11)
  46. // added by nathanf 10/3/96 for Raid 6904 - exclude all subdirs is missing
  47. #define RF_EXCLUDE_ALL (1 << 12)
  48. #define RF_DELETE (1 << 16)
  49. #define RF_NO_REPLICATE_ACLS (1 << 17)
  50. #define RF_DATA (1 << 18)
  51. #define RF_NO_FORCE_REPL (1 << 19)
  52. #define RF_NO_PERMIT_TREE (1 << 20)
  53. #define RF_NO_IN_PROC (1 << 21)
  54. #define RF_NO_INCREMENTAL (1 << 22)
  55. #define RF_NO_FASTMODE (1 << 23)
  56. #define RF_NO_ON_DIR_CHANGE (1 << 24)
  57. #define RF_NO_AUTO_ROUTE (1 << 25)
  58. #define RF_NO_ON_NOTIFY (1 << 26)
  59. #define RF_CHAIN (1 << 27)
  60. #define REPL_STATE_EMPTY 0
  61. #define REPL_STATE_STARTING 1
  62. #define REPL_STATE_RUNNING 2
  63. #define REPL_STATE_COMPLETE 3
  64. #define REPL_STATE_ABORTED 4
  65. #define REPL_STATE_CANCLED 5
  66. #define REPL_STATE_RECEIVING 6
  67. #define PARM_VALUE_ENCRYPTED 1
  68. #define CP_PROPOGATE_ALL 1
  69. #define MAX_PARM_STRING 300
  70. typedef void *REPLICATION_INSTANCE; // @type REPLICATION_INSTANCE | Identifier of a particular replication instance. Needed to call any function which manipulates or queries and existing replication
  71. #ifndef UNICODE_ONLY
  72. // @struct SELECTION_ENTRY_A | Defines a single entry member of a fileset for a given replication request
  73. typedef struct _SELECTION_ENTRY_A
  74. {
  75. CHAR cPath[MAX_PATH]; //@field The path specification
  76. DWORD dwFlags; //@field Flags which indicate handle the entry should be handled.
  77. } SELECTION_ENTRY_A;
  78. #endif
  79. #ifndef ANSI_ONLY
  80. // @struct SELECTION_ENTRY_A | Defines a single entry member of a fileset for a given replication request
  81. typedef struct _SELECTION_ENTRY_W
  82. {
  83. WCHAR cPath[MAX_PATH]; //@field The path specification
  84. DWORD dwFlags; //@field Flags which indicate handle the entry should be handled.
  85. } SELECTION_ENTRY_W;
  86. #endif
  87. #ifdef UNICODE
  88. #define SELECTION_ENTRY SELECTION_ENTRY_W
  89. #else
  90. #define SELECTION_ENTRY SELECTION_ENTRY_A
  91. #endif
  92. // @struct SELECTION_LIST | Defines a complete fileset for a replication.
  93. typedef struct _SELECTION_LIST
  94. {
  95. int nEntries; //@field The number of selection entries in the list.
  96. SELECTION_ENTRY sList[1]; //@field An Array of selection entries.
  97. } SELECTION_LIST;
  98. // @struct REPLICATION_COUNTERS | Counters used to record replication information. Returned by QueryReplication.
  99. typedef struct _REPLICATION_COUNTERS
  100. {
  101. DWORD dwStartStamp; //@field Start Time
  102. DWORD dwFilesSent; //@field The Total files that have been sent across this connection.
  103. DWORD dwFilesReceived; //@field The total files that have been received across this connection.
  104. DWORD dwFilesMatched; //@field The number of files that matched and did not need to be sent
  105. DWORD dwFilesErrored; //@field The number of files which had errors
  106. DWORD dwBytesSent; //@field The total bytes sent across this connection.
  107. DWORD dwBytesReceived; //@field The total bytes received across this connection.
  108. DWORD dwBytesMatched; //@field The total bytes which matched and did not need to be sent.
  109. DWORD dwBytesErrored; //@field The total bytes errored
  110. DWORD dwDirectoriesProcessed; //@field The number of directories processed
  111. } REPLICATION_COUNTERS;
  112. #ifndef UNICODE_ONLY
  113. //@struct REPLICATION_INFO_A | Contains information about a particular replication instance.
  114. // Is returned by <f QueryReplication> and <f EnumReplications>.
  115. typedef struct _REPLICATION_INFO_A
  116. {
  117. REPLICATION_INSTANCE hInstance; //@field The instance id for this replication.
  118. CHAR cProject[MAX_PROJECT]; //@field The project associated with this replication.
  119. DWORD dwState; //@field The Current State of this replication
  120. // @flag REPL_STATE_EMPTY | This Replication Info structure is empty.
  121. // @flag REPL_STATE_STARTING | The replication is a startup state.
  122. // @flag REPL_STATE_RUNNING | The replication is currently running.
  123. // @flag REPL_STATE_COMPLETE | The replication is complete.
  124. // @flag REPL_STATE_ABORTED | The replication aborted due to an error.
  125. // @flag REPL_STATE_CANCLED | The replication was canceled.
  126. // @flag REPL_STATE_RECEIVING | The replication is receiving data.
  127. DWORD dwError; // @field An error code if the replication aborted
  128. DWORD dwFlags; //@field Flags this replication was started with.
  129. // @flag RF_NO_DELETE | Turns of Delete Processing
  130. // @flag RF_REPLICATE_ACLS | Replicates ACL's
  131. // @flag RF_NO_DATA | Skips Replicating Data, will only replicate directories.
  132. // @flag RF_FORCE_REPL | Forces data to be replicated without checking first
  133. // @flag RF_IN_PROC | Causes the StartReplication API to run in process (note: This blocks!)
  134. // @flag RF_INCREMENTAL | Runs replication in "Incremental" mode, meaning that only files which have been locally detected to have been modified since the last replication are checked and sent.
  135. // @flag RF_FASTMODE | Uses Unframed Protocol for enhanced performance over faster/secure links.
  136. // @flag RF_ON_DIR_CHANGE | Turns on monitor mode. This will monitor a directory for changes and then replicate them to the destination.
  137. // @flag RF_AUTO_ROUTE | Uses information in the routing table to determine destinations servers.
  138. // @flag RF_NOTIFY | Turns on notify mode. Replications occur based on notifications from the IAcceptNotify COM interface.
  139. // @flag RF_PERMIT_TREE | Applies ACLs on the directory structure to the files beneath it.
  140. } REPLICATION_INFO_A;
  141. #endif
  142. #ifndef ANSI_ONLY
  143. //@struct REPLICATION_INFO_W | Contains information about a particular replication instance.
  144. // Is returned by <f QueryReplication> and <f EnumReplications>.
  145. typedef struct _REPLICATION_INFO_W
  146. {
  147. REPLICATION_INSTANCE hInstance; //@field The instance id for this replication.
  148. WCHAR cProject[MAX_PROJECT]; //@field The project associated with this replication.
  149. DWORD dwState; //@field The Current State of this replication
  150. // @flag REPL_STATE_EMPTY | This Replication Info structure is empty.
  151. // @flag REPL_STATE_STARTING | The replication is a startup state.
  152. // @flag REPL_STATE_RUNNING | The replication is currently running.
  153. // @flag REPL_STATE_COMPLETE | The replication is complete.
  154. // @flag REPL_STATE_ABORTED | The replication aborted due to an error.
  155. // @flag REPL_STATE_CANCLED | The replication was canceled.
  156. // @flag REPL_STATE_RECEIVING | The replication is receiving data.
  157. DWORD dwError; // @field An error code if the replication aborted
  158. DWORD dwFlags; //@field Flags this replication was started with.
  159. // @flag RF_NO_DELETE | Turns of Delete Processing
  160. // @flag RF_REPLICATE_ACLS | Replicates ACL's
  161. // @flag RF_NO_DATA | Skips Replicating Data, will only replicate directories.
  162. // @flag RF_FORCE_REPL | Forces data to be replicated without checking first
  163. // @flag RF_IN_PROC | Causes the StartReplication API to run in process (note: This blocks!)
  164. // @flag RF_INCREMENTAL | Runs replication in "Incremental" mode, meaning that only files which have been locally detected to have been modified since the last replication are checked and sent.
  165. // @flag RF_FASTMODE | Uses Unframed Protocol for enhanced performance over faster/secure links.
  166. // @flag RF_ON_DIR_CHANGE | Turns on monitor mode. This will monitor a directory for changes and then replicate them to the destination.
  167. // @flag RF_AUTO_ROUTE | Uses information in the routing table to determine destinations servers.
  168. // @flag RF_NOTIFY | Turns on notify mode. Replications occur based on notifications from the IAcceptNotify COM interface.
  169. // @flag RF_PERMIT_TREE | Applies ACLs on the directory structure to the files beneath it.
  170. } REPLICATION_INFO_W;
  171. #endif
  172. #ifdef UNICODE
  173. #define REPLICATION_INFO REPLICATION_INFO_W
  174. #else
  175. #define REPLICATION_INFO REPLICATION_INFO_A
  176. #endif
  177. #ifndef UNICODE_ONLY
  178. //@struct PROJECT_INFO | Returns a list of projects with some additional information.
  179. // Is returned by <f EnumProjects>.
  180. typedef struct _PROJECT_INFO_A
  181. {
  182. CHAR cProject[ MAX_PROJECT]; //@field Project name
  183. CHAR cReplicationMethod[MAX_PROJECT]; //@field Replication method ("SENDINET" or "PULL")
  184. CHAR cDestination[ MAX_LOCATION]; //@field Destination server or route.
  185. CHAR cRootUrl[MAX_LOCATION]; //@field Root URL of a pull replication.
  186. CHAR cLocalDir[MAX_LOCATION]; //@field Local directory.
  187. CHAR cComments[MAX_LOCATION]; //@field User comments.
  188. } PROJECT_INFO_A;
  189. #endif
  190. #ifndef ANSI_ONLY
  191. //@struct PROJECT_INFO | Returns a list of projects with some additional information.
  192. // Is returned by <f EnumProjects>.
  193. typedef struct _PROJECT_INFO_W
  194. {
  195. WCHAR cProject[ MAX_PROJECT]; //@field Project name
  196. WCHAR cReplicationMethod[MAX_PROJECT]; //@field Replication method ("SENDINET" or "PULL")
  197. WCHAR cDestination[ MAX_LOCATION]; //@field Destination server or route.
  198. WCHAR cRootUrl[MAX_LOCATION]; //@field Root URL of a pull replication.
  199. WCHAR cLocalDir[MAX_LOCATION]; //@field Local directory.
  200. WCHAR cComments[MAX_LOCATION]; //@field User comments.
  201. } PROJECT_INFO_W;
  202. #endif
  203. #ifdef UNICODE
  204. #define PROJECT_INFO PROJECT_INFO_W
  205. #else
  206. #define PROJECT_INFO PROJECT_INFO_A
  207. #endif
  208. #ifndef UNICODE_ONLY
  209. //@struct ROUTE_LIST_A | Returns the list of routes defined for a server.
  210. // Is returned by <f ListRoutes>.
  211. typedef struct _ROUTE_LIST_A
  212. {
  213. CHAR cRouteName[MAX_PROJECT]; //@field Name of the route.
  214. CHAR cDestinations[MAX_LOCATION]; //@field Multi-string list of destinations (format "dest1\0dest2\0\0")
  215. CHAR cBaseDirectory[MAX_LOCATION]; //@field Base directory for projects using this route.
  216. } ROUTE_LIST_A;
  217. #endif
  218. #ifndef ANSI_ONLY
  219. //@struct ROUTE_LIST_W | Returns the list of routes defined for a server.
  220. // Is returned by <f ListRoutes>.
  221. typedef struct _ROUTE_LIST_W
  222. {
  223. WCHAR cRouteName[MAX_PROJECT]; //@field Name of the route.
  224. WCHAR cDestinations[MAX_LOCATION]; //@field Multi-string list of destinations (format "dest1\0dest2\0\0")
  225. WCHAR cBaseDirectory[MAX_LOCATION]; //@field Base directory for projects using this route.
  226. } ROUTE_LIST_W;
  227. #endif
  228. #ifdef UNICODE
  229. #define ROUTE_LIST ROUTE_LIST_W
  230. #else
  231. #define ROUTE_LIST ROUTE_LIST_A
  232. #endif
  233. #ifndef UNICODE_ONLY
  234. //@struct PARMSET_A | Defines a Parameter for <f CreateNewProject>, <f SetProject>, and <f QueryProject>.
  235. typedef struct
  236. {
  237. DWORD dwType; //@field Parameter Type (Registry type values, REG_SZ, etc).
  238. DWORD dwFlags; //@field Parameter flags
  239. DWORD dwSize; //@field Size of value parameter
  240. CHAR cParmName[MAX_PARM_STRING]; //@field Parameter Name
  241. CHAR cParmValue[MAX_PARM_STRING]; //@field Parameter Value
  242. }PARMSET_A;
  243. #endif
  244. #ifndef ANSI_ONLY
  245. //@struct PARMSET_W | Defines a Parameter for <f CreateNewProject>, <f SetProject>, and <f QueryProject>.
  246. typedef struct
  247. {
  248. DWORD dwType; //@field Parameter Type (Registry type values, REG_SZ, etc).
  249. DWORD dwFlags; //@field Parameter flags
  250. DWORD dwSize; //@field Size of value parameter
  251. WCHAR cParmName[MAX_PARM_STRING]; //@field Parameter Name
  252. WCHAR cParmValue[MAX_PARM_STRING]; //@field Parameter Value
  253. }PARMSET_W;
  254. #endif
  255. #ifdef UNICODE
  256. #define PARMSET PARMSET_W
  257. #else
  258. #define PARMSET PARMSET_A
  259. #endif
  260. //@struct PARM_LIST | Contains a list of parameters to pass with <f CreateNewProject>, <f SetProject>, <f QueryProject>.
  261. typedef struct _PARM_LIST
  262. {
  263. DWORD dwNumParms; // @field The number of Parameters in this list
  264. PARMSET Parms[1]; // @field An array of Parameters
  265. } PARM_LIST;
  266. #ifndef UNICODE_ONLY
  267. typedef struct _PARM_LIST_A
  268. {
  269. DWORD dwNumParms; // @field The number of Parameters in this list
  270. PARMSET_A Parms[1]; // @field An array of Parameters
  271. } PARM_LIST_A;
  272. #endif
  273. #define CRS_STOP_SERVICE (1<<1)
  274. #define CRS_PAUSE_SERVICE (1<<2)
  275. #define CRS_RESUME_SERVICE (1<<3)
  276. #define CRS_START_SERVICE (1<<4)
  277. #define CRS_USER_ACCESS ( KEY_READ )
  278. #define CRS_ADMIN_ACCESS ( KEY_ALL_ACCESS | READ_CONTROL )
  279. typedef SELECTION_LIST *PSELECTION_LIST;
  280. typedef REPLICATION_INSTANCE *PREPLICATION_INSTANCE;
  281. #define SELECT_LIST_SIZE(p) ((p->nEntries * sizeof(SELECTION_ENTRY))+sizeof(p->nEntries))
  282. #ifndef USE_COM_APIS
  283. #ifndef UNICODE_ONLY
  284. DWORD CRSAPI CancelReplicationA(LPCSTR pszServer, REPLICATION_INSTANCE hInstance,DWORD dwFlags );
  285. #endif
  286. #ifndef ANSI_ONLY
  287. DWORD CRSAPI CancelReplicationW(LPCWSTR pszServer, REPLICATION_INSTANCE hInstance,DWORD dwFlags );
  288. #endif
  289. #ifdef UNICODE
  290. #define CancelReplication CancelReplicationW
  291. #else
  292. #define CancelReplication CancelReplicationA
  293. #endif
  294. #ifndef UNICODE_ONLY
  295. DWORD CRSAPI StartReplicationA(LPCSTR pszServer, LPCSTR pszProject, PSELECTION_LIST slFileSet, DWORD dwFlags, PREPLICATION_INSTANCE hInstance);
  296. #endif
  297. #ifndef ANSI_ONLY
  298. DWORD CRSAPI StartReplicationW(LPCWSTR pszServer, LPCWSTR pszProject, PSELECTION_LIST slFileSet, DWORD dwFlags, PREPLICATION_INSTANCE hInstance);
  299. #endif
  300. #ifdef UNICODE
  301. #define StartReplication StartReplicationW
  302. #else
  303. #define StartReplication StartReplicationA
  304. #endif
  305. #ifndef UNICODE_ONLY
  306. DWORD CRSAPI QueryReplicationA(LPCSTR pszServer, REPLICATION_INSTANCE hInstance, REPLICATION_INFO_A *rpInfo, REPLICATION_COUNTERS *rCounters);
  307. #endif
  308. #ifndef ANSI_ONLY
  309. DWORD CRSAPI QueryReplicationW(LPCWSTR pszServer, REPLICATION_INSTANCE hInstance, REPLICATION_INFO_W *rpInfo, REPLICATION_COUNTERS *rCounters);
  310. #endif
  311. #ifdef UNICODE
  312. #define QueryReplication QueryReplicationW
  313. #else
  314. #define QueryReplication QueryReplicationA
  315. #endif
  316. #ifndef UNICODE_ONLY
  317. DWORD CRSAPI EnumReplicationsA(LPCSTR pszServer, LPCSTR pszMatchProject, DWORD dwMatchState, DWORD *dwNumReplications, void **pBuffer);
  318. #endif
  319. #ifndef ANSI_ONLY
  320. DWORD CRSAPI EnumReplicationsW(LPCWSTR pszServer, LPCWSTR pszMatchProject, DWORD dwMatchState, DWORD *dwNumReplications, void **pBuffer);
  321. #endif
  322. #ifdef UNICODE
  323. #define EnumReplications EnumReplicationsW
  324. #else
  325. #define EnumReplications EnumReplicationsA
  326. #endif
  327. #ifndef UNICODE_ONLY
  328. DWORD CRSAPI LockTransactionsA(LPCSTR pszServer, LPCSTR pszProject, DWORD dwWait, DWORD dwFlags);
  329. #endif
  330. #ifndef ANSI_ONLY
  331. DWORD CRSAPI LockTransactionsW(LPCTSTR pszServer, LPCTSTR pszProject, DWORD dwWait, DWORD dwFlags);
  332. #endif
  333. #ifdef UNICODE
  334. #define LockTransactions LockTransactionsW
  335. #else
  336. #define LockTransactions LockTransactionsA
  337. #endif
  338. #ifndef UNICODE_ONLY
  339. DWORD CRSAPI UnlockTransactionsA(LPCSTR pszServer, LPCSTR pszProject, DWORD dwFlags);
  340. #endif
  341. #ifndef ANSI_ONLY
  342. DWORD CRSAPI UnlockTransactionsW(LPCWSTR pszServer, LPCWSTR pszProject, DWORD dwFlags);
  343. #endif
  344. #ifdef UNICODE
  345. #define UnlockTransactions UnlockTransactionsW
  346. #else
  347. #define UnlockTransactions UnlockTransactionsA
  348. #endif
  349. #ifndef UNICODE_ONLY
  350. DWORD CRSAPI RollbackReplicationA(LPCSTR pszServer, LPCSTR pszProject,int nRollbacks,DWORD dwFlags);
  351. #endif
  352. #ifndef ANSI_ONLY
  353. DWORD CRSAPI RollbackReplicationW(LPCWSTR pszServer, LPCWSTR pszProject,int nRollbacks,DWORD dwFlags);
  354. #endif
  355. #ifdef UNICODE
  356. #define RollbackReplication RollbackReplicationW
  357. #else
  358. #define RollbackReplication RollbackReplicationA
  359. #endif
  360. #ifndef UNICODE_ONLY
  361. DWORD CRSAPI ReturnLogA(LPCSTR pszServer, DWORD dwOffset, DWORD *dwSize, PVOID pvBuffer);
  362. #endif
  363. #ifndef ANSI_ONLY
  364. DWORD CRSAPI ReturnLogW(LPCWSTR pszServer, DWORD dwOffset, DWORD *dwSize, PVOID pvBuffer);
  365. #endif
  366. #ifdef UNICODE
  367. #define ReturnLog ReturnLogW
  368. #else
  369. #define ReturnLog ReturnLogA
  370. #endif
  371. #ifndef UNICODE_ONLY
  372. DWORD CRSAPI CreateNewProjectA(LPCSTR pszServer, LPCSTR pszProjectType, LPCSTR pszProject, DWORD dwFlags, LPCSTR pszDest, LPCSTR pszLocalDir, PARM_LIST *pParms);
  373. #endif
  374. #ifndef ANSI_ONLY
  375. DWORD CRSAPI CreateNewProjectW(LPCWSTR pszServer, LPCWSTR pszProjectType, LPCWSTR pszProject, DWORD dwFlags, LPCWSTR pszDest, LPCWSTR pszLocalDir, PARM_LIST *pParms);
  376. #endif
  377. #ifdef UNICODE
  378. #define CreateNewProject CreateNewProjectW
  379. #else
  380. #define CreateNewProject CreateNewProjectA
  381. #endif
  382. #ifndef UNICODE_ONLY
  383. DWORD CRSAPI DeleteProjectA(LPCSTR pszServer, LPCSTR pzsProject, DWORD dwFlags);
  384. #endif
  385. #ifndef ANSI_ONLY
  386. DWORD CRSAPI DeleteProjectW(LPCWSTR pszServer, LPCWSTR pzsProject, DWORD dwFlags);
  387. #endif
  388. #ifdef UNICODE
  389. #define DeleteProject DeleteProjectW
  390. #else
  391. #define DeleteProject DeleteProjectA
  392. #endif
  393. #ifndef UNICODE_ONLY
  394. DWORD CRSAPI EnumProjectsA( LPCSTR pszServer, DWORD dwFlags, DWORD *dwNumProjects, void **pBuffer);
  395. #endif
  396. #ifndef ANSI_ONLY
  397. DWORD CRSAPI EnumProjectsW( LPCWSTR pszServer, DWORD dwFlags, DWORD *dwNumProjects, void **pBuffer);
  398. #endif
  399. #ifdef UNICODE
  400. #define EnumProjects EnumProjectsW
  401. #else
  402. #define EnumProjects EnumProjectsA
  403. #endif
  404. #ifndef UNICODE_ONLY
  405. DWORD CRSAPI QueryProjectA( LPCSTR pszServer, LPCSTR pszProject, PARM_LIST **pParmList);
  406. #endif
  407. #ifndef ANSI_ONLY
  408. DWORD CRSAPI QueryProjectW( LPCWSTR pszServer, LPCWSTR pszProject, PARM_LIST **pParmList);
  409. #endif
  410. #ifdef UNICODE
  411. #define QueryProject QueryProjectW
  412. #else
  413. #define QueryProject QueryProjectA
  414. #endif
  415. #ifndef UNICODE_ONLY
  416. DWORD CRSAPI SetProjectA( LPCSTR pszServer, LPCSTR pszProject, PARM_LIST *pParmList);
  417. #endif
  418. #ifndef ANSI_ONLY
  419. DWORD CRSAPI SetProjectW( LPCWSTR pszServer, LPCWSTR pszProject, PARM_LIST *pParmList);
  420. #endif
  421. #ifdef UNICODE
  422. #define SetProject SetProjectW
  423. #else
  424. #define SetProject SetProjectA
  425. #endif
  426. #ifndef UNICODE_ONLY
  427. DWORD CRSAPI AddRouteA( LPCSTR pszServer, LPCSTR pszRoute, LPSTR pszDestinations, LPCSTR pszBaseDir );
  428. #endif
  429. #ifndef ANSI_ONLY
  430. DWORD CRSAPI AddRouteW( LPCWSTR pszServer, LPCWSTR pszRoute, LPWSTR pszDestinations, LPCWSTR pszBaseDir );
  431. #endif
  432. #ifdef UNICODE
  433. #define AddRoute AddRouteW
  434. #else
  435. #define AddRoute AddRouteA
  436. #endif
  437. #ifndef UNICODE_ONLY
  438. DWORD CRSAPI ListRoutesA( LPCSTR pszServer, LPDWORD dwNumRoutes, ROUTE_LIST_A **pRouteList);
  439. #endif
  440. #ifndef ANSI_ONLY
  441. DWORD CRSAPI ListRoutesW( LPCWSTR pszServer, LPDWORD dwNumRoutes, ROUTE_LIST_W **pRouteList);
  442. #endif
  443. #ifdef UNICODE
  444. #define ListRoutes ListRoutesW
  445. #else
  446. #define ListRoutes ListRoutesA
  447. #endif
  448. #ifndef UNICODE_ONLY
  449. DWORD CRSAPI DeleteRouteA( LPCSTR pszServer, LPCSTR pszRoute);
  450. #endif
  451. #ifndef ANSI_ONLY
  452. DWORD CRSAPI DeleteRouteW( LPCWSTR pszServer, LPCWSTR pszRoute);
  453. #endif
  454. #ifdef UNICODE
  455. #define DeleteRoute DeleteRouteW
  456. #else
  457. #define DeleteRoute DeleteRouteA
  458. #endif
  459. #ifndef UNICODE_ONLY
  460. DWORD CRSAPI CrsInitLoggingA(LPCSTR pszLoggingName, BOOL fFullLogging);
  461. #endif
  462. #ifndef ANSI_ONLY
  463. DWORD CRSAPI CrsInitLoggingW(LPCWSTR pszLoggingName, BOOL fFullLogging);
  464. #endif
  465. #ifdef UNICODE
  466. #define CrsInitLogging CrsInitLoggingW
  467. #else
  468. #define CrsInitLogging CrsInitLoggingA
  469. #endif
  470. #ifndef UNICODE_ONLY
  471. DWORD CRSAPI CrsControlA( LPCSTR pszServer, DWORD dwFlags);
  472. #endif
  473. #ifndef ANSI_ONLY
  474. DWORD CRSAPI CrsControlW( LPCWSTR pszServer, DWORD dwFlags);
  475. #endif
  476. #ifdef UNICODE
  477. #define CrsControl CrsControlW
  478. #else
  479. #define CrsControl CrsControlA
  480. #endif
  481. #ifndef UNICODE_ONLY
  482. DWORD CRSAPI QueryReplicationGlobalsA( LPCSTR pszServer, PARM_LIST **ppParmList);
  483. #endif
  484. #ifndef ANSI_ONLY
  485. DWORD CRSAPI QueryReplicationGlobalsW( LPCWSTR pszServer, PARM_LIST **ppParmList);
  486. #endif
  487. #ifdef UNICODE
  488. #define QueryReplicationGlobals QueryReplicationGlobalsW
  489. #else
  490. #define QueryReplicationGlobals QueryReplicationGlobalsA
  491. #endif
  492. #ifndef UNICODE_ONLY
  493. DWORD CRSAPI SetReplicationGlobalsA( LPCSTR pszServer, PARM_LIST *ppParmList);
  494. #endif
  495. #ifndef ANSI_ONLY
  496. DWORD CRSAPI SetReplicationGlobalsW( LPCWSTR pszServer, PARM_LIST *ppParmList);
  497. #endif
  498. #ifdef UNICODE
  499. #define SetReplicationGlobals SetReplicationGlobalsW
  500. #else
  501. #define SetReplicationGlobals SetReplicationGlobalsA
  502. #endif
  503. #ifndef UNICODE_ONLY
  504. DWORD CRSAPI CrsGrantAccessA( LPCSTR pszServer, LPCSTR pszProject, LPCSTR pszUserName, DWORD dwAccess );
  505. #endif
  506. #ifndef ANSI_ONLY
  507. DWORD CRSAPI CrsGrantAccessW( LPCWSTR pszServer, LPCWSTR pszProject, LPCWSTR pszUserName, DWORD dwAccess );
  508. #endif
  509. #ifdef UNICODE
  510. #define CrsGrantAccess CrsGrantAccessW
  511. #else
  512. #define CrsGrantAccess CrsGrantAccessA
  513. #endif
  514. #ifndef UNICODE_ONLY
  515. DWORD CRSAPI CrsRemoveAccessA( LPCSTR pszServer, LPCSTR pszProject, LPCSTR pszUserName);
  516. #endif
  517. #ifndef ANSI_ONLY
  518. DWORD CRSAPI CrsRemoveAccessW( LPCWSTR pszServer, LPCWSTR pszProject, LPCWSTR pszUserName);
  519. #endif
  520. #ifdef UNICODE
  521. #define CrsRemoveAccess CrsRemoveAccessW
  522. #else
  523. #define CrsRemoveAccess CrsRemoveAccessA
  524. #endif
  525. DWORD CRSAPI FreeEnumBuffer(void **pBuffer);
  526. BOOL CRSAPI IsCrsAdmin(void);
  527. #endif // USE_COM_APIS
  528. #endif