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.

337 lines
19 KiB

  1. /*
  2. * SVCAPI.H
  3. *
  4. * RSM Service : Service API header (NEW)
  5. *
  6. * Author: ErvinP
  7. *
  8. * (c) 2001 Microsoft Corporation
  9. *
  10. */
  11. // BUGBUG - contains many redundancies and errors
  12. HANDLE WINAPI OpenNtmsServerSessionW( LPCWSTR lpServer,
  13. LPCWSTR lpApplication,
  14. LPCWSTR lpClientName,
  15. LPCWSTR lpUserName,
  16. DWORD dwOptions,
  17. LPVOID lpConnectionContext);
  18. HANDLE WINAPI OpenNtmsSessionA( LPCSTR lpServer,
  19. LPCSTR lpApplication,
  20. LPCSTR lpClientName,
  21. LPCSTR lpUserName,
  22. DWORD dwOptions,
  23. LPVOID lpConnectionContext);
  24. HRESULT WINAPI CloseNtmsSession(HANDLE hSession);
  25. HRESULT WINAPI SubmitNtmsOperatorRequestW( HANDLE hSession,
  26. DWORD dwRequest,
  27. LPCWSTR lpMessage,
  28. LPNTMS_GUID lpArg1Id,
  29. LPNTMS_GUID lpArg2Id,
  30. LPNTMS_GUID lpRequestId);
  31. HRESULT WINAPI SubmitNtmsOperatorRequestA( HANDLE hSession,
  32. DWORD dwRequest,
  33. LPCSTR lpMessage,
  34. LPNTMS_GUID lpArg1Id,
  35. LPNTMS_GUID lpArg2Id,
  36. LPNTMS_GUID lpRequestId);
  37. HRESULT WINAPI WaitForNtmsOperatorRequest( HANDLE hSession,
  38. LPNTMS_GUID lpRequestId,
  39. DWORD dwTimeout);
  40. HRESULT WINAPI CancelNtmsOperatorRequest(HANDLE hSession, LPNTMS_GUID lpRequestId);
  41. HRESULT WINAPI SatisfyNtmsOperatorRequest(HANDLE hSession, LPNTMS_GUID lpRequestId);
  42. HRESULT WINAPI ImportNtmsDatabase(HANDLE hSession);
  43. HRESULT WINAPI ExportNtmsDatabase(HANDLE hSession);
  44. HRESULT WINAPI GetNtmsMountDrives( HANDLE hSession,
  45. LPNTMS_MOUNT_INFORMATION lpMountInformation,
  46. LPNTMS_GUID lpDriveId,
  47. DWORD dwCount);
  48. HRESULT WINAPI AllocateNtmsMedia( HANDLE hSession,
  49. LPNTMS_GUID lpMediaPool,
  50. LPNTMS_GUID lpPartition, // optional
  51. LPNTMS_GUID lpMediaId, // OUTPUT, media id o
  52. DWORD dwOptions,
  53. DWORD dwTimeout,
  54. LPNTMS_ALLOCATION_INFORMATION lpAllocateInformation);
  55. HRESULT WINAPI DeallocateNtmsMedia( HANDLE hSession,
  56. LPNTMS_GUID lpMediaId,
  57. DWORD dwOptions);
  58. HRESULT WINAPI SwapNtmsMedia( HANDLE hSession,
  59. LPNTMS_GUID lpMediaId1,
  60. LPNTMS_GUID lpMediaId2);
  61. HRESULT WINAPI DecommissionNtmsMedia( HANDLE hSession,
  62. LPNTMS_GUID lpMediaId);
  63. HRESULT WINAPI SetNtmsMediaComplete( HANDLE hSession,
  64. LPNTMS_GUID lpMediaId);
  65. HRESULT WINAPI DeleteNtmsMedia( HANDLE hSession,
  66. LPNTMS_GUID lpMediaId);
  67. HRESULT WINAPI CreateNtmsMediaPoolA( HANDLE hSession,
  68. LPCSTR lpPoolName,
  69. LPNTMS_GUID lpMediaType,
  70. DWORD dwAction,
  71. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  72. OUT LPNTMS_GUID lpPoolId);
  73. HRESULT WINAPI CreateNtmsMediaPoolW( HANDLE hSession,
  74. LPCWSTR lpPoolName,
  75. LPNTMS_GUID lpMediaType,
  76. DWORD dwAction,
  77. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  78. OUT LPNTMS_GUID lpPoolId);
  79. HRESULT WINAPI GetNtmsMediaPoolNameA( HANDLE hSession,
  80. LPNTMS_GUID lpPoolId,
  81. LPSTR lpBufName,
  82. LPDWORD lpdwNameSize);
  83. HRESULT WINAPI GetNtmsMediaPoolNameW( HANDLE hSession,
  84. LPNTMS_GUID lpPoolId,
  85. LPWSTR lpBufName,
  86. LPDWORD lpdwNameSize);
  87. HRESULT WINAPI MoveToNtmsMediaPool( HANDLE hSession,
  88. LPNTMS_GUID lpMediaId,
  89. LPNTMS_GUID lpPoolId);
  90. HRESULT WINAPI DeleteNtmsMediaPool(HANDLE hSession, LPNTMS_GUID lpPoolId);
  91. HRESULT WINAPI AddNtmsMediaType( HANDLE hSession,
  92. LPNTMS_GUID lpMediaTypeId,
  93. LPNTMS_GUID lpLibId);
  94. HRESULT WINAPI DeleteNtmsMediaType( HANDLE hSession,
  95. LPNTMS_GUID lpMediaTypeId,
  96. LPNTMS_GUID lpLibId);
  97. HRESULT WINAPI ChangeNtmsMediaType( HANDLE hSession,
  98. LPNTMS_GUID lpMediaId,
  99. LPNTMS_GUID lpPoolId);
  100. HRESULT WINAPI MountNtmsMedia( HANDLE hSession,
  101. LPNTMS_GUID lpMediaId,
  102. LPNTMS_GUID lpDriveId,
  103. DWORD dwCount,
  104. DWORD dwOptions,
  105. int dwPriority,
  106. DWORD dwTimeout,
  107. LPNTMS_MOUNT_INFORMATION lpMountInformation);
  108. HRESULT WINAPI DismountNtmsMedia( HANDLE hSession,
  109. LPNTMS_GUID lpMediaId,
  110. DWORD dwCount,
  111. DWORD dwOptions);
  112. DWORD WINAPI EjectNtmsMedia( HANDLE hSession,
  113. LPNTMS_GUID lpMediaId,
  114. LPNTMS_GUID lpEjectOperation,
  115. DWORD dwAction);
  116. DWORD WINAPI InjectNtmsMedia( HANDLE hSession,
  117. LPNTMS_GUID lpLibraryId,
  118. LPNTMS_GUID lpInjectOperation,
  119. DWORD dwAction);
  120. DWORD WINAPI AccessNtmsLibraryDoor( HANDLE hSession,
  121. LPNTMS_GUID lpLibraryId,
  122. DWORD dwAction);
  123. DWORD WINAPI CleanNtmsDrive( HANDLE hSession,
  124. LPNTMS_GUID lpDriveId);
  125. DWORD WINAPI DismountNtmsDrive( HANDLE hSession,
  126. LPNTMS_GUID lpDriveId);
  127. DWORD WINAPI InventoryNtmsLibrary(
  128. HANDLE hSession,
  129. LPNTMS_GUID lpLibraryId,
  130. DWORD dwAction
  131. )
  132. DWORD WINAPI UpdateNtmsOmidInfo( HANDLE hSession,
  133. LPNTMS_GUID lpMediaId,
  134. DWORD labelType,
  135. DWORD numberOfBytes,
  136. LPVOID lpBuffer);
  137. DWORD WINAPI CancelNtmsLibraryRequest( HANDLE hSession,
  138. LPNTMS_GUID lpRequestId);
  139. DWORD WINAPI ReserveNtmsCleanerSlot( HANDLE hSession,
  140. LPNTMS_GUID lpLibrary,
  141. LPNTMS_GUID lpSlot);
  142. DWORD WINAPI ReleaseNtmsCleanerSlot( HANDLE hSession,
  143. LPNTMS_GUID lpLibrary);
  144. DWORD WINAPI InjectNtmsCleaner( HANDLE hSession,
  145. LPNTMS_GUID lpLibrary,
  146. LPNTMS_GUID lpInjectOperation,
  147. DWORD dwNumberOfCleansLeft,
  148. DWORD dwAction);
  149. DWORD WINAPI EjectNtmsCleaner( HANDLE hSession,
  150. LPNTMS_GUID lpLibrary,
  151. LPNTMS_GUID lpEjectOperation,
  152. DWORD dwAction);
  153. DWORD WINAPI DeleteNtmsLibrary(HANDLE hSession, LPNTMS_GUID lpLibraryId);
  154. DWORD WINAPI DeleteNtmsDrive(HANDLE hSession, LPNTMS_GUID lpDriveId);
  155. DWORD WINAPI GetNtmsRequestOrder( HANDLE hSession,
  156. LPNTMS_GUID lpRequestId,
  157. LPDWORD lpdwOrderNumber);
  158. DWORD WINAPI SetNtmsRequestOrder( HANDLE hSession,
  159. LPNTMS_GUID lpRequestId,
  160. DWORD dwOrderNumber);
  161. DWORD WINAPI DeleteNtmsRequests( HANDLE hSession,
  162. LPNTMS_GUID lpRequestId,
  163. DWORD dwType,
  164. DWORD dwCount);
  165. DWORD WINAPI BeginNtmsDeviceChangeDetection(HANDLE hSession, LPHANDLE lpDetectHandle);
  166. DWORD WINAPI SetNtmsDeviceChangeDetection( HANDLE hSession,
  167. HANDLE DetectHandle,
  168. LPNTMS_GUID lpRequestId,
  169. DWORD dwType,
  170. DWORD dwCount);
  171. DWORD WINAPI EndNtmsDeviceChangeDetection(HANDLE hSession, HANDLE DetectHandle);
  172. /******** BUGBUG: INtmsObjectManagement1 APIs *********************/
  173. DWORD WINAPI GetNtmsObjectSecurity( HANDLE hSession,
  174. LPNTMS_GUID lpObjectId,
  175. DWORD dwType,
  176. SECURITY_INFORMATION RequestedInformation,
  177. PSECURITY_DESCRIPTOR lpSecurityDescriptor,
  178. DWORD nLength,
  179. LPDWORD lpnLengthNeeded);
  180. DWORD WINAPI SetNtmsObjectSecurity( HANDLE hSession,
  181. LPNTMS_GUID lpObjectId,
  182. DWORD dwType,
  183. SECURITY_INFORMATION SecurityInformation,
  184. PSECURITY_DESCRIPTOR lpSecurityDescriptor);
  185. DWORD WINAPI GetNtmsObjectAttributeA( HANDLE hSession,
  186. LPNTMS_GUID lpObjectId,
  187. DWORD dwType,
  188. LPCSTR lpAttributeName,
  189. LPVOID lpAttributeData,
  190. LPDWORD lpAttributeSize);
  191. DWORD WINAPI GetNtmsObjectAttributeW( HANDLE hSession,
  192. LPNTMS_GUID lpObjectId,
  193. DWORD dwType,
  194. LPCWSTR lpAttributeName,
  195. LPVOID lpAttributeData,
  196. LPDWORD lpAttributeSize);
  197. DWORD WINAPI SetNtmsObjectAttributeA( HANDLE hSession,
  198. LPNTMS_GUID lpObjectId,
  199. DWORD dwType,
  200. LPCSTR lpAttributeName,
  201. LPVOID lpAttributeData,
  202. DWORD dwAttributeSize);
  203. DWORD WINAPI SetNtmsObjectAttributeW( HANDLE hSession,
  204. LPNTMS_GUID lpObjectId,
  205. DWORD dwType,
  206. LPCWSTR lpAttributeName,
  207. LPVOID lpAttributeData,
  208. DWORD AttributeSize);
  209. DWORD WINAPI EnumerateNtmsObject( HANDLE hSession,
  210. const LPNTMS_GUID lpContainerId,
  211. LPNTMS_GUID lpList,
  212. LPDWORD lpdwListSize,
  213. DWORD dwType,
  214. DWORD dwOptions);
  215. DWORD WINAPI EnableNtmsObject( HANDLE hSession,
  216. DWORD dwType,
  217. LPNTMS_GUID lpObjectId);
  218. DWORD WINAPI DisableNtmsObject( HANDLE hSession,
  219. DWORD dwType,
  220. LPNTMS_GUID lpObjectId);
  221. /******* BUGBUG: INtmsObjectInfo1 APIs ****************************/
  222. // BUGBUG - these 4 functions have another form with type,size as last args
  223. DWORD WINAPI GetNtmsServerObjectInformationA( HANDLE hSession,
  224. LPNTMS_GUID lpObjectId,
  225. LPNTMS_OBJECTINFORMATIONA lpInfo,
  226. int revision);
  227. DWORD WINAPI GetNtmsServerObjectInformationW( HANDLE hSession,
  228. LPNTMS_GUID lpObjectId,
  229. LPNTMS_OBJECTINFORMATIONW lpInfo,
  230. int revision);
  231. DWORD WINAPI SetNtmsServerObjectInformationA( HANDLE hSession,
  232. LPNTMS_GUID lpObjectId,
  233. LPNTMS_OBJECTINFORMATIONA lpInfo,
  234. int revision);
  235. DWORD WINAPI SetNtmsServerObjectInformationW( HANDLE hSession,
  236. LPNTMS_GUID lpObjectId,
  237. LPNTMS_OBJECTINFORMATIONW lpInfo,
  238. int revision);
  239. DWORD WINAPI CreateNtmsMediaA( HANDLE hSession,
  240. LPNTMS_OBJECTINFORMATIONA lpMedia,
  241. LPNTMS_OBJECTINFORMATIONA lpList,
  242. DWORD dwOptions);
  243. DWORD WINAPI CreateNtmsMediaW( HANDLE hSession,
  244. LPNTMS_OBJECTINFORMATIONW lpMedia,
  245. LPNTMS_OBJECTINFORMATIONW lpList,
  246. DWORD dwOptions);
  247. DWORD WINAPI GetNtmsObjectInformationA( HANDLE hSession,
  248. LPNTMS_GUID lpObjectId,
  249. LPNTMS_OBJECTINFORMATIONA lpInfo);
  250. DWORD WINAPI GetNtmsObjectInformationW( HANDLE hSession,
  251. LPNTMS_GUID lpObjectId,
  252. LPNTMS_OBJECTINFORMATIONW lpInfo);
  253. DWORD WINAPI SetNtmsObjectInformationA( HANDLE hSession,
  254. LPNTMS_GUID lpObjectId,
  255. LPNTMS_OBJECTINFORMATIONA lpInfo);
  256. DWORD WINAPI SetNtmsObjectInformationW( HANDLE hSession,
  257. LPNTMS_GUID lpObjectId,
  258. LPNTMS_OBJECTINFORMATIONW lpInfo);
  259. DWORD WINAPI SubmitNtmsOperatorRequestA( HANDLE hSession,
  260. DWORD dwRequest,
  261. LPCSTR lpMessage,
  262. LPNTMS_GUID lpArg1Id,
  263. LPNTMS_GUID lpArg2Id,
  264. LPNTMS_GUID lpRequestId);
  265. DWORD WINAPI SubmitNtmsOperatorRequestW( HANDLE hSession,
  266. DWORD dwRequest,
  267. LPCWSTR lpMessage,
  268. LPNTMS_GUID lpArg1Id,
  269. LPNTMS_GUID lpArg2Id,
  270. LPNTMS_GUID lpRequestId);
  271. DWORD WINAPI WaitForNtmsOperatorRequest( HANDLE hSession,
  272. LPNTMS_GUID lpRequestId,
  273. DWORD dwTimeout);
  274. DWORD WINAPI CancelNtmsOperatorRequest(HANDLE hSession, LPNTMS_GUID lpRequestId);
  275. DWORD WINAPI SatisfyNtmsOperatorRequest(HANDLE hSession, LPNTMS_GUID lpRequestId);
  276. HANDLE WINAPI OpenNtmsNotification(HANDLE hSession, DWORD dwType);
  277. DWORD WINAPI WaitForNtmsNotification( HANDLE hNotification,
  278. LPNTMS_NOTIFICATIONINFORMATION lpNotificationInformation,
  279. DWORD dwTimeout);
  280. DWORD WINAPI CloseNtmsNotification(HANDLE hNotification);
  281. DWORD WINAPI ImportNtmsDatabase(HANDLE hSession);
  282. DWORD WINAPI ExportNtmsDatabase(HANDLE hSession);
  283. DWORD WINAPI EjectDiskFromSADriveA( LPCSTR lpComputerName,
  284. LPCSTR lpAppName,
  285. LPCSTR lpDeviceName,
  286. HWND hWnd,
  287. LPCSTR lpTitle,
  288. LPCSTR lpMessage,
  289. DWORD dwOptions);
  290. DWORD WINAPI EjectDiskFromSADriveW( LPCWSTR lpComputerName,
  291. LPCWSTR lpAppName,
  292. LPCWSTR lpDeviceName,
  293. HWND hWnd,
  294. LPCWSTR lpTitle,
  295. LPCWSTR lpMessage,
  296. DWORD dwOptions);
  297. DWORD WINAPI GetVolumesFromDriveA( LPSTR pszDriveName,
  298. LPSTR* VolumeNameBufferPtr,
  299. LPSTR* DriveLetterBufferPtr);
  300. DWORD WINAPI GetVolumesFromDriveW( LPWSTR pszDriveName,
  301. LPWSTR *VolumeNameBufferPtr,
  302. LPWSTR *DriveLetterBufferPtr);
  303. DWORD WINAPI IdentifyNtmsSlot( HANDLE hSession,
  304. LPNTMS_GUID lpSlotId,
  305. DWORD dwOption);
  306. DWORD WINAPI GetNtmsUIOptionsA( HANDLE hSession,
  307. const LPNTMS_GUID lpObjectId,
  308. DWORD dwType,
  309. LPSTR lpszDestination,
  310. LPDWORD lpAttributeSize);
  311. DWORD WINAPI GetNtmsUIOptionsW( HANDLE hSession,
  312. const LPNTMS_GUID lpObjectId,
  313. DWORD dwType,
  314. LPWSTR lpszDestination,
  315. LPDWORD lpdwSize);
  316. DWORD WINAPI SetNtmsUIOptionsA( HANDLE hSession,
  317. const LPNTMS_GUID lpObjectId,
  318. DWORD dwType,
  319. DWORD dwOperation,
  320. LPCSTR lpszDestination);
  321. DWORD WINAPI SetNtmsUIOptionsW( HANDLE hSession,
  322. const LPNTMS_GUID lpObjectId,
  323. DWORD dwType,
  324. DWORD dwOperation,
  325. LPCWSTR lpszDestination);