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.

482 lines
11 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. nwwks.idl
  5. Abstract:
  6. This is the IDL file that describes the RPC interface for the
  7. NetWare workstation internal APIs.
  8. Author:
  9. Rita Wong (ritaw) 11-Feb-1993
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. Yi-Hsin Sung ( yihsins ) 24-Apr-1993
  14. Added NwrOpenEnumPrintServers and NwrOpenEnumPrintQueues
  15. Glenn A. Curtis (glennc) 19-Oct-1995
  16. Added NwrGetUser, NwrGetResourceInformation, and NwrGetResourceParent
  17. --*/
  18. //
  19. // Interface Attributes
  20. //
  21. [
  22. uuid(E67AB081-9844-3521-9D32-834F038001C0),
  23. version(1.0),
  24. pointer_default(unique)
  25. ]
  26. //
  27. // Interface Keyword
  28. //
  29. interface nwwks
  30. //
  31. // Interface Body
  32. //
  33. {
  34. import "imports.idl";
  35. //
  36. // Handle types
  37. //
  38. typedef [handle] wchar_t * NWWKSTA_IMPERSONATE_HANDLE;
  39. typedef [handle] wchar_t * NWWKSTA_IDENTIFY_HANDLE;
  40. typedef [context_handle] PVOID NWWKSTA_CONTEXT_HANDLE;
  41. typedef NWWKSTA_CONTEXT_HANDLE *LPNWWKSTA_CONTEXT_HANDLE;
  42. typedef [context_handle] PVOID NWWKSTA_PRINTER_CONTEXT;
  43. typedef NWWKSTA_PRINTER_CONTEXT *LPNWWKSTA_PRINTER_CONTEXT;
  44. typedef struct _NW_JOB_INFO {
  45. DWORD nPosition;
  46. [string, unique] wchar_t *pDocument;
  47. [string, unique] wchar_t *pUserName;
  48. } NW_JOB_INFO, *PNW_JOB_INFO;
  49. //
  50. // Function prototype
  51. //
  52. DWORD
  53. NwrCreateConnection(
  54. [in,string,unique] NWWKSTA_IMPERSONATE_HANDLE Reserved,
  55. [in,string,unique] wchar_t * LocalName,
  56. [in,string] wchar_t * RemoteName,
  57. [in] DWORD Type,
  58. [in,string,unique] wchar_t * Password,
  59. [in,string,unique] wchar_t * UserName
  60. );
  61. typedef struct _NWSERVER {
  62. [string] wchar_t * ServerName;
  63. } NWSERVER, *LPNWSERVER;
  64. DWORD
  65. NwrChangePassword(
  66. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  67. [in] DWORD UserLuid,
  68. [in,string] wchar_t * UserName,
  69. [in,string,unique] wchar_t * OldPassword,
  70. [in,string,unique] wchar_t * NewPassword,
  71. [in,string] wchar_t * TreeName
  72. );
  73. DWORD
  74. NwrDeleteConnection(
  75. [in,string,unique] NWWKSTA_IMPERSONATE_HANDLE Reserved,
  76. [in,string] wchar_t * ConnectionName,
  77. [in] DWORD UseForce
  78. );
  79. DWORD
  80. NwrQueryServerResource(
  81. [in,string,unique] NWWKSTA_IMPERSONATE_HANDLE Reserved,
  82. [in,string] wchar_t * LocalName,
  83. [in, out,string, unique, size_is(RemoteNameLen * sizeof(wchar_t))] wchar_t * RemoteName,
  84. [in] DWORD RemoteNameLen,
  85. [out] LPDWORD CharsRequired
  86. );
  87. DWORD
  88. NwrOpenEnumConnections(
  89. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  90. [in] DWORD ConnectionType,
  91. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  92. );
  93. DWORD
  94. NwrOpenEnumContextInfo(
  95. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  96. [in] DWORD ConnectionType,
  97. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  98. );
  99. DWORD
  100. NwrOpenEnumServersAndNdsTrees(
  101. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  102. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  103. );
  104. DWORD
  105. NwrOpenEnumNdsSubTrees_Disk(
  106. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  107. [in,string] wchar_t * ParentPathName,
  108. [in,out,unique] LPDWORD ClassTypeOfNDSLeaf,
  109. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  110. );
  111. DWORD
  112. NwrOpenEnumNdsSubTrees_Print(
  113. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  114. [in,string] wchar_t * ParentPathName,
  115. [in,out,unique] LPDWORD ClassTypeOfNDSLeaf,
  116. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  117. );
  118. DWORD
  119. NwrOpenEnumNdsSubTrees_Any(
  120. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  121. [in,string] wchar_t * ParentPathName,
  122. [in,out,unique] LPDWORD ClassTypeOfNDSLeaf,
  123. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  124. );
  125. DWORD
  126. NwrOpenEnumVolumes(
  127. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  128. [in,string] wchar_t * ServerName,
  129. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  130. );
  131. DWORD
  132. NwrOpenEnumQueues(
  133. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  134. [in,string] wchar_t * ServerName,
  135. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  136. );
  137. DWORD
  138. NwrOpenEnumVolumesQueues(
  139. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  140. [in,string] wchar_t * ServerName,
  141. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  142. );
  143. DWORD
  144. NwrOpenEnumDirectories(
  145. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  146. [in,string] wchar_t * VolumeName,
  147. [in,string,unique] wchar_t * UserName,
  148. [in,string,unique] wchar_t * Password,
  149. [out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  150. );
  151. DWORD
  152. NwrEnum(
  153. [in] NWWKSTA_CONTEXT_HANDLE EnumHandle,
  154. [in] DWORD_PTR EntriesRequested,
  155. [out,size_is(BufferSize)] LPBYTE Buffer,
  156. [in] DWORD BufferSize,
  157. [out] LPDWORD BytesNeeded,
  158. [out] LPDWORD EntriesRead
  159. );
  160. DWORD
  161. NwrEnumConnections(
  162. [in] NWWKSTA_CONTEXT_HANDLE EnumHandle,
  163. [in] DWORD EntriesRequested,
  164. [out,size_is(BufferSize)] LPBYTE Buffer,
  165. [in] DWORD BufferSize,
  166. [out] LPDWORD BytesNeeded,
  167. [out] LPDWORD EntriesRead,
  168. [in] DWORD fImplicitConnections
  169. );
  170. DWORD
  171. NwrCloseEnum(
  172. [in,out] LPNWWKSTA_CONTEXT_HANDLE EnumHandle
  173. );
  174. DWORD
  175. NwrLogonUser(
  176. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  177. [in] PLUID LogonId,
  178. [in,string] wchar_t * UserName,
  179. [in,string,unique] wchar_t * Password,
  180. [in,string,unique] wchar_t * ServerName,
  181. [in,string,unique] wchar_t * NdsServerName,
  182. [in,out,string,unique,size_is(LogonCommandLength * sizeof(wchar_t))] wchar_t * LogonCommand,
  183. [in] DWORD LogonCommandLength,
  184. [in] DWORD PrintOption
  185. );
  186. DWORD
  187. NwrLogoffUser(
  188. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  189. [in] PLUID LogonId
  190. );
  191. DWORD
  192. NwrSetInfo(
  193. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  194. [in] DWORD PrintOption,
  195. [in,string,unique] wchar_t * ServerName
  196. );
  197. DWORD
  198. NwrValidateUser(
  199. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  200. [in,string,unique] wchar_t * ServerName
  201. );
  202. DWORD
  203. NwrOpenPrinter(
  204. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  205. [in,string] wchar_t *PrinterName,
  206. [in] DWORD fKnownPrinter,
  207. [out] LPNWWKSTA_PRINTER_CONTEXT PrinterHandle
  208. );
  209. DWORD
  210. NwrClosePrinter(
  211. [in,out] LPNWWKSTA_PRINTER_CONTEXT PrinterHandle
  212. );
  213. DWORD
  214. NwrGetPrinter(
  215. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  216. [in] DWORD Level,
  217. [in,out,unique,size_is(BufferSize)] LPBYTE PrinterInfo,
  218. [in] DWORD BufferSize,
  219. [out] LPDWORD BytesNeeded
  220. );
  221. DWORD
  222. NwrSetPrinter(
  223. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  224. [in] DWORD Command
  225. );
  226. DWORD
  227. NwrEnumPrinters(
  228. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  229. [in,string,unique] wchar_t *ContainerName,
  230. [in,out,unique,size_is(BufferSize)] LPBYTE Buffer,
  231. [in] DWORD BufferSize,
  232. [out] LPDWORD BytesNeeded,
  233. [out] LPDWORD EntriesRead
  234. );
  235. DWORD
  236. NwrStartDocPrinter(
  237. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  238. [in,string,unique] wchar_t *DocumentName,
  239. [in,string,unique] wchar_t *UserName,
  240. [in] DWORD PrintOption,
  241. [in] DWORD fGateway
  242. );
  243. DWORD
  244. NwrWritePrinter(
  245. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  246. [in,size_is(BufferSize)] LPBYTE Buffer,
  247. [in] DWORD BufferSize,
  248. [out] LPDWORD BytesWritten
  249. );
  250. DWORD
  251. NwrAbortPrinter(
  252. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle
  253. );
  254. DWORD
  255. NwrEndDocPrinter(
  256. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle
  257. );
  258. DWORD
  259. NwrEnumJobs(
  260. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  261. [in] DWORD FirstJobRequested,
  262. [in] DWORD EntriesRequested,
  263. [in] DWORD Level,
  264. [in,out,unique,size_is(BufferSize)] LPBYTE Buffer,
  265. [in] DWORD BufferSize,
  266. [out] LPDWORD BytesNeeded,
  267. [out] LPDWORD EntriesRead
  268. );
  269. DWORD
  270. NwrGetJob(
  271. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  272. [in] DWORD JobId,
  273. [in] DWORD Level,
  274. [in,out,unique,size_is(BufferSize)] LPBYTE JobInfo,
  275. [in] DWORD BufferSize,
  276. [out] LPDWORD BytesNeeded
  277. );
  278. DWORD
  279. NwrSetJob(
  280. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  281. [in] DWORD JobId,
  282. [in] DWORD Level,
  283. [in, unique] PNW_JOB_INFO pNwJobInfo,
  284. [in] DWORD Command
  285. );
  286. DWORD
  287. NwrAddJob(
  288. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  289. [out] LPADDJOB_INFO_1W AddInfo1,
  290. [in] DWORD BufferSize,
  291. [out] LPDWORD BytesNeeded
  292. );
  293. DWORD
  294. NwrScheduleJob(
  295. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  296. [in] DWORD JobId
  297. );
  298. DWORD
  299. NwrWaitForPrinterChange(
  300. [in] NWWKSTA_PRINTER_CONTEXT PrinterHandle,
  301. [in,out] LPDWORD Flags
  302. );
  303. DWORD
  304. NwrEnumGWDevices(
  305. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  306. [in, out] PDWORD Index,
  307. [in,out,unique,size_is(BufferSize)] LPBYTE Buffer,
  308. [in] DWORD BufferSize,
  309. [out] LPDWORD BytesNeeded,
  310. [out] LPDWORD EntriesRead
  311. );
  312. DWORD
  313. NwrAddGWDevice(
  314. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  315. [in,string,unique] wchar_t *DeviceName,
  316. [in,string,unique] wchar_t *RemoteName,
  317. [in,string,unique] wchar_t *AccountName,
  318. [in,string,unique] wchar_t *Password,
  319. [in] DWORD Flags
  320. );
  321. DWORD
  322. NwrDeleteGWDevice(
  323. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  324. [in,string,unique] wchar_t *DeviceName,
  325. [in] DWORD Flags
  326. );
  327. DWORD
  328. NwrQueryGatewayAccount(
  329. [in,string,unique] NWWKSTA_IMPERSONATE_HANDLE Reserved,
  330. [in, out,string, unique, size_is(AccountNameLen * sizeof(wchar_t))] wchar_t * AccountName,
  331. [in] DWORD AccountNameLen,
  332. [out] LPDWORD AccountCharsNeeded,
  333. [in, out,string, unique, size_is(PasswordLen * sizeof(wchar_t))] wchar_t * Password,
  334. [in] DWORD PasswordLen,
  335. [out] LPDWORD PasswordCharsNeeded
  336. );
  337. DWORD
  338. NwrSetGatewayAccount(
  339. [in,string,unique] NWWKSTA_IMPERSONATE_HANDLE Reserved,
  340. [in,string] wchar_t * AccountName,
  341. [in,string] wchar_t * Passwoed
  342. );
  343. #ifndef QFE_BUILD
  344. DWORD
  345. NwrGetService(
  346. [in, string, unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  347. [in] WORD nServiceType,
  348. [in, string] wchar_t *lpServiceName,
  349. [in] DWORD dwProperties,
  350. [in, out, unique, size_is(dwBufferLength)] LPBYTE lpServiceInfo,
  351. [in] DWORD dwBufferLength,
  352. [out] LPDWORD lpdwBytesNeeded
  353. );
  354. DWORD
  355. NwrSetService(
  356. [in, string, unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  357. [in] DWORD dwOperation,
  358. [in] LPSERVICE_INFOW lpServiceInfo,
  359. [in] WORD nServiceType
  360. );
  361. DWORD
  362. NwrGetUser(
  363. [in, string, unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  364. [in, string, unique] wchar_t * lpRemoteName,
  365. [out, size_is(dwUserNameBufferSize)] LPBYTE lpUserName,
  366. [in] DWORD dwUserNameBufferSize,
  367. [out] LPDWORD lpdwCharsRequired
  368. );
  369. DWORD
  370. NwrGetResourceInformation(
  371. [in, string, unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  372. [in, string, unique] wchar_t * lpRemoteName,
  373. [in] DWORD dwType,
  374. [out, size_is(dwBufferSize)] LPBYTE lpBuffer,
  375. [in] DWORD dwBufferSize,
  376. [out] LPDWORD lpdwBytesNeeded,
  377. [out] LPDWORD lpdwSystemOffset
  378. );
  379. DWORD
  380. NwrGetConnectionPerformance(
  381. [in, string, unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  382. [in, string, unique] wchar_t * lpRemoteName,
  383. [out, size_is(dwBufferSize)] LPBYTE lpNetConnectInfo,
  384. [in] DWORD dwBufferSize
  385. );
  386. DWORD
  387. NwrGetResourceParent(
  388. [in, string, unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  389. [in, string, unique] wchar_t * lpRemoteName,
  390. [in] DWORD dwType,
  391. [out, size_is(dwBufferSize)] LPBYTE lpBuffer,
  392. [in] DWORD dwBufferSize,
  393. [out] LPDWORD lpdwBytesNeeded
  394. );
  395. DWORD
  396. NwrSetLogonScript(
  397. [in,string,unique] NWWKSTA_IDENTIFY_HANDLE Reserved,
  398. [in] DWORD ScriptOptions
  399. );
  400. #endif
  401. }