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.

915 lines
26 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. faxrpc.idl
  5. Abstract:
  6. Contains the remoted fax service apis.
  7. Author:
  8. Wesley Witt (wesw) 10-Jan-1996
  9. Environment:
  10. User-mode - Win32 - MIDL
  11. --*/
  12. //
  13. // Interface Attributes
  14. //
  15. [
  16. uuid(ea0a3165-4834-11d2-a6f8-00c04fa346cc),
  17. version(4.0),
  18. pointer_default(unique)
  19. ]
  20. //
  21. // Interface Keyword
  22. //
  23. interface fax
  24. //
  25. // Interface Body
  26. //
  27. {
  28. #define HCALL DWORD
  29. import "imports.idl"; // import all the include files
  30. #include "FaxRpcLimit.h"
  31. //
  32. // Context handles
  33. //
  34. typedef [context_handle] HANDLE RPC_FAX_PORT_HANDLE; // FaxOpenPort handle
  35. typedef [ref] RPC_FAX_PORT_HANDLE *PRPC_FAX_PORT_HANDLE;
  36. typedef [context_handle] HANDLE RPC_FAX_SVC_HANDLE; // FaxConnectFaxServer handle
  37. typedef [ref] RPC_FAX_SVC_HANDLE *PRPC_FAX_SVC_HANDLE;
  38. typedef [context_handle] HANDLE RPC_FAX_MSG_ENUM_HANDLE; // FaxStartMessageEnum handle
  39. typedef [ref] RPC_FAX_MSG_ENUM_HANDLE *PRPC_FAX_MSG_ENUM_HANDLE;
  40. typedef [context_handle] HANDLE RPC_FAX_COPY_HANDLE; // FaxStartCopy*Server handle
  41. typedef [ref] RPC_FAX_COPY_HANDLE *PRPC_FAX_COPY_HANDLE;
  42. typedef [context_handle] HANDLE RPC_FAX_EVENT_HANDLE; // FaxStartServerNotification handle
  43. typedef [ref] RPC_FAX_EVENT_HANDLE *PRPC_FAX_EVENT_HANDLE;
  44. typedef [context_handle] HANDLE RPC_FAX_EVENT_EX_HANDLE; // FaxStartServerNotificationEx handle
  45. typedef [ref] RPC_FAX_EVENT_EX_HANDLE *PRPC_FAX_EVENT_EX_HANDLE;
  46. #ifdef SERVER_STUB
  47. //
  48. //How to use the range attribute with pointer parameter:
  49. //
  50. //The solution is to employ typedef for this purpose, as shown below:
  51. //
  52. // typedef [range(0, MAX)] long BOUNDED_DWORD;
  53. // typedef BOUNDED_DWORD * LPBOUNDED_DWORD;
  54. //
  55. // Two typedefs are required because range is not applicable on a pointer type.
  56. // As this feature is not available in versions of Windows before Windows 2000 SP3 and Windows XP SP1,
  57. // the following pragma may be used to supress MIDL compiler warnings that would result from employing this technique:
  58. //
  59. // midl_pragma warning( disable: 2466 2467)
  60. //
  61. midl_pragma warning( disable: 2466 2467 )
  62. typedef [range(0, RPC_COPY_BUFFER_SIZE)] DWORD RANGED_DWORD;
  63. typedef RANGED_DWORD * LPRANGED_DWORD;
  64. #else
  65. typedef DWORD * LPRANGED_DWORD;
  66. #endif
  67. //
  68. // Structures
  69. //
  70. typedef struct _RPC_FAX_OUTBOUND_ROUTING_GROUPW
  71. {
  72. DWORD dwSizeOfStruct;
  73. [string] LPWSTR lpwstrGroupName;
  74. [range(0,FAX_MAX_DEVICES_IN_GROUP)]DWORD dwNumDevices;
  75. [unique, size_is(dwNumDevices)] LPDWORD lpdwDevices;
  76. FAX_ENUM_GROUP_STATUS Status;
  77. } RPC_FAX_OUTBOUND_ROUTING_GROUPW, *PRPC_FAX_OUTBOUND_ROUTING_GROUPW;
  78. typedef [switch_type(int)] union _FAX_RULE_DESTINATION
  79. {
  80. [case(0)]
  81. DWORD dwDeviceId;
  82. [default]
  83. [string] LPWSTR lpwstrGroupName;
  84. } FAX_RULE_DESTINATION;
  85. typedef struct _RPC_FAX_OUTBOUND_ROUTING_RULEW
  86. {
  87. DWORD dwSizeOfStruct;
  88. DWORD dwAreaCode;
  89. DWORD dwCountryCode;
  90. [string] LPWSTR lpwstrCountryName;
  91. [switch_is(bUseGroup)] FAX_RULE_DESTINATION Destination;
  92. BOOL bUseGroup;
  93. } RPC_FAX_OUTBOUND_ROUTING_RULEW, *PRPC_FAX_OUTBOUND_ROUTING_RULEW;
  94. //
  95. // functions
  96. //
  97. error_status_t
  98. FAX_GetServicePrinters(
  99. [in] handle_t hBinding,
  100. [out, size_is(,*lpdwBufferSize)] LPBYTE *lpBuffer,
  101. [out, ref] LPDWORD lpdwBufferSize,
  102. [out, ref] LPDWORD lpdwPrintersReturned
  103. );
  104. error_status_t
  105. FAX_ConnectionRefCount(
  106. [in] handle_t hBinding,
  107. [in, out] PRPC_FAX_SVC_HANDLE Handle,
  108. [in] DWORD Connect,
  109. [out] LPDWORD CanShare
  110. );
  111. error_status_t
  112. FAX_OpenPort(
  113. [in] handle_t hBinding,
  114. [in] DWORD DeviceId,
  115. [in] DWORD Flags,
  116. [out] PRPC_FAX_PORT_HANDLE FaxPortHandle
  117. );
  118. error_status_t
  119. FAX_ClosePort(
  120. [in,out] PRPC_FAX_PORT_HANDLE FaxPortHandle
  121. );
  122. error_status_t
  123. FAX_EnumJobs(
  124. [in] handle_t hBinding,
  125. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  126. [out, ref] LPDWORD BufferSize,
  127. [out, ref] LPDWORD JobsReturned
  128. );
  129. error_status_t
  130. FAX_GetJob(
  131. [in] handle_t hBinding,
  132. [in] DWORD JobId,
  133. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  134. [out, ref] LPDWORD BufferSize
  135. );
  136. error_status_t
  137. FAX_SetJob(
  138. [in] handle_t hBinding,
  139. [in] DWORD JobId,
  140. [in] DWORD Command
  141. );
  142. error_status_t
  143. FAX_GetPageData(
  144. [in] handle_t hBinding,
  145. [in] DWORD JobId,
  146. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  147. [out, ref] LPDWORD BufferSize,
  148. [in, out] LPDWORD ImageWidth,
  149. [in, out] LPDWORD ImageHeight
  150. );
  151. error_status_t
  152. FAX_GetDeviceStatus(
  153. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  154. [out, size_is(,*BufferSize)] LPBYTE*StatusBuffer,
  155. [out, ref] LPDWORD BufferSize
  156. );
  157. error_status_t
  158. FAX_Abort(
  159. [in] handle_t hBinding,
  160. [in] DWORD JobId
  161. );
  162. error_status_t
  163. FAX_EnumPorts(
  164. [in] handle_t hBinding,
  165. [out, size_is(,*BufferSize)] LPBYTE *PortBuffer,
  166. [out, ref] LPDWORD BufferSize,
  167. [out, ref] LPDWORD PortsReturned
  168. );
  169. error_status_t
  170. FAX_GetPort(
  171. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  172. [out, size_is(,*BufferSize)] LPBYTE *PortBuffer,
  173. [out, ref] LPDWORD BufferSize
  174. );
  175. error_status_t
  176. FAX_SetPort(
  177. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  178. [in] const FAX_PORT_INFO *PortInfo
  179. );
  180. error_status_t
  181. FAX_EnumRoutingMethods(
  182. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  183. [out, size_is(,*RoutingInfoBufferSize)] LPBYTE *RoutingInfoBuffer,
  184. [out, ref] LPDWORD RoutingInfoBufferSize,
  185. [out, ref] LPDWORD PortsReturned
  186. );
  187. error_status_t
  188. FAX_EnableRoutingMethod(
  189. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  190. [in, string, unique] LPCWSTR RoutingGuid,
  191. [in] BOOL Enabled
  192. );
  193. error_status_t
  194. FAX_GetRoutingInfo(
  195. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  196. [in, string, unique] LPCWSTR RoutingGuid,
  197. [out, size_is(,*RoutingInfoBufferSize)] LPBYTE *RoutingInfoBuffer,
  198. [out, ref] LPDWORD RoutingInfoBufferSize
  199. );
  200. error_status_t
  201. FAX_SetRoutingInfo(
  202. [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
  203. [in, string, unique] LPCWSTR RoutingGuid,
  204. [in, unique, size_is(RoutingInfoBufferSize)] const BYTE *RoutingInfoBuffer,
  205. [in, range(0,FAX_MAX_RPC_BUFFER)] DWORD RoutingInfoBufferSize
  206. );
  207. error_status_t
  208. FAX_EnumGlobalRoutingInfo(
  209. [in] handle_t hBinding,
  210. [out, size_is(,*RoutingInfoBufferSize)] LPBYTE *RoutingInfoBuffer,
  211. [out, ref] LPDWORD RoutingInfoBufferSize,
  212. [out, ref] LPDWORD MethodsReturned
  213. );
  214. error_status_t
  215. FAX_SetGlobalRoutingInfo(
  216. [in] handle_t hBinding,
  217. [in] const FAX_GLOBAL_ROUTING_INFOW *RoutingInfo
  218. );
  219. error_status_t
  220. FAX_GetConfiguration(
  221. [in] handle_t hBinding,
  222. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  223. [out, ref] LPDWORD BufferSize
  224. );
  225. error_status_t
  226. FAX_SetConfiguration(
  227. [in] handle_t hBinding,
  228. [in] const FAX_CONFIGURATIONW *FaxConfig
  229. );
  230. error_status_t
  231. FAX_GetLoggingCategories(
  232. [in] handle_t hBinding,
  233. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  234. [out, ref] LPDWORD BufferSize,
  235. [out, ref] LPDWORD NumberCategories
  236. );
  237. error_status_t
  238. FAX_SetLoggingCategories(
  239. [in] handle_t hBinding,
  240. [in, unique, size_is(BufferSize)] const LPBYTE Buffer,
  241. [in, range(0,FAX_MAX_RPC_BUFFER)] DWORD BufferSize,
  242. [in] DWORD NumberCategories
  243. );
  244. error_status_t
  245. FAX_GetSecurity(
  246. [in] handle_t hBinding,
  247. [out, size_is(,*lpdwBufferSize)] LPBYTE * pSecurityDescriptor,
  248. [out, ref] LPDWORD lpdwBufferSize
  249. )
  250. ;
  251. error_status_t
  252. FAX_SetSecurity(
  253. [in] handle_t hBinding,
  254. [in] SECURITY_INFORMATION SecurityInformation,
  255. [in, unique, size_is(dwBufferSize)] const LPBYTE pSecurityDescriptor,
  256. [in, range(0,FAX_MAX_RPC_BUFFER)] DWORD dwBufferSize
  257. );
  258. error_status_t
  259. FAX_AccessCheck(
  260. [in] handle_t hBinding,
  261. [in] DWORD AccessMask,
  262. [out, ref] BOOL* pfAccess,
  263. [in, out, unique] LPDWORD lpdwRights
  264. );
  265. error_status_t
  266. FAX_CheckServerProtSeq(
  267. [in] handle_t hbinding,
  268. [in, out, unique] LPDWORD lpdwProtSeq
  269. );
  270. //**************************
  271. //* Extension API
  272. //**************************
  273. error_status_t
  274. FAX_SendDocumentEx
  275. (
  276. [in] handle_t hBinding,
  277. [in, string, unique] LPCWSTR lpcwstrFileName,
  278. [in] LPCFAX_COVERPAGE_INFO_EXW lpcCoverPageInfo,
  279. [in] LPCFAX_PERSONAL_PROFILEW lpcSenderProfile,
  280. [in, range(0,FAX_MAX_RECIPIENTS) ] DWORD dwNumRecipients,
  281. [in, size_is(dwNumRecipients)] LPCFAX_PERSONAL_PROFILEW lpcRecipientList,
  282. [in] LPCFAX_JOB_PARAM_EXW lpJobParams,
  283. [in, out, unique] LPDWORD lpdwJobId,
  284. [out] PDWORDLONG lpdwlMessageId,
  285. [out, size_is(dwNumRecipients)] PDWORDLONG lpdwlRecipientMessageIds
  286. );
  287. error_status_t
  288. FAX_EnumJobsEx(
  289. [in] handle_t hBinding,
  290. [in] DWORD dwJobTypes,
  291. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  292. [out, ref] LPDWORD BufferSize,
  293. [out, ref] LPDWORD lpdwJobs
  294. );
  295. error_status_t
  296. FAX_GetJobEx(
  297. [in] handle_t hBinding,
  298. [in] DWORDLONG dwlMessageID,
  299. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  300. [out, ref] LPDWORD BufferSize
  301. );
  302. error_status_t
  303. FAX_GetCountryList(
  304. [in] handle_t FaxHandle,
  305. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  306. [out, ref] LPDWORD BufferSize
  307. );
  308. error_status_t
  309. FAX_GetPersonalProfileInfo
  310. (
  311. [in] handle_t hBinding,
  312. [in] DWORDLONG dwlMessageId,
  313. [in] FAX_ENUM_MESSAGE_FOLDER dwFolder,
  314. [in] FAX_ENUM_PERSONAL_PROF_TYPES ProfType,
  315. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  316. [out, ref] LPDWORD BufferSize
  317. );
  318. //************************************
  319. //* Getting / Setting the queue state
  320. //************************************
  321. error_status_t
  322. FAX_GetQueueStates (
  323. [in] handle_t hFaxHandle,
  324. [out] LPDWORD pdwQueueStates
  325. );
  326. error_status_t
  327. FAX_SetQueue (
  328. [in] handle_t hFaxHandle,
  329. [in] const DWORD dwQueueStates
  330. );
  331. //*************************************************
  332. //* Getting / Setting the receipts configuration
  333. //*************************************************
  334. error_status_t
  335. FAX_GetReceiptsConfiguration (
  336. [in] handle_t hFaxHandle,
  337. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  338. [out, ref] LPDWORD BufferSize
  339. );
  340. error_status_t
  341. FAX_SetReceiptsConfiguration (
  342. [in] handle_t hFaxHandle,
  343. [in, ref] const PFAX_RECEIPTS_CONFIGW pReceipts
  344. );
  345. error_status_t
  346. FAX_GetReceiptsOptions (
  347. [in] handle_t hFaxHandle,
  348. [out, ref] LPDWORD lpdwReceiptsOptions // Combination of DRT_EMAIL and DRT_MSGBOX
  349. );
  350. //********************************************
  351. //* Server version
  352. //********************************************
  353. error_status_t
  354. FAX_GetVersion (
  355. [in] handle_t hFaxHandle,
  356. [in, out] PFAX_VERSION pVersion
  357. );
  358. //*********************************************
  359. //* Getting / Setting the Outbox configuration
  360. //*********************************************
  361. error_status_t
  362. FAX_GetOutboxConfiguration (
  363. [in] handle_t hFaxHandle,
  364. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  365. [out, ref] LPDWORD BufferSize
  366. );
  367. error_status_t
  368. FAX_SetOutboxConfiguration (
  369. [in] handle_t hFaxHandle,
  370. [in, ref] const PFAX_OUTBOX_CONFIG pOutboxCfg
  371. );
  372. error_status_t
  373. FAX_GetPersonalCoverPagesOption (
  374. [in] handle_t hFaxHandle,
  375. [out, ref] LPBOOL lpbPersonalCPAllowed
  376. );
  377. //********************************************
  378. //* Archive configuration
  379. //********************************************
  380. error_status_t
  381. FAX_GetArchiveConfiguration (
  382. [in] handle_t hFaxHandle,
  383. [in] FAX_ENUM_MESSAGE_FOLDER Folder,
  384. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  385. [out, ref] LPDWORD BufferSize
  386. );
  387. error_status_t
  388. FAX_SetArchiveConfiguration (
  389. [in] handle_t hFaxHandle,
  390. [in] FAX_ENUM_MESSAGE_FOLDER Folder,
  391. [in, ref] const PFAX_ARCHIVE_CONFIGW pArchiveCfg
  392. );
  393. //********************************************
  394. //* Activity logging
  395. //********************************************
  396. error_status_t
  397. FAX_GetActivityLoggingConfiguration (
  398. [in] handle_t hFaxHandle,
  399. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  400. [out, ref] LPDWORD BufferSize
  401. );
  402. error_status_t
  403. FAX_SetActivityLoggingConfiguration (
  404. [in] handle_t hFaxHandle,
  405. [in, ref] const PFAX_ACTIVITY_LOGGING_CONFIGW pActivLogCfg
  406. );
  407. //********************************************
  408. //* FSP
  409. //********************************************
  410. error_status_t
  411. FAX_EnumerateProviders (
  412. [in] handle_t hFaxHandle,
  413. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  414. [out, ref] LPDWORD BufferSize,
  415. [out, ref] LPDWORD lpdwNumProviders
  416. );
  417. //********************************************
  418. //* Ports
  419. //********************************************
  420. error_status_t
  421. FAX_GetPortEx (
  422. [in] handle_t hFaxHandle,
  423. [in] DWORD dwDeviceId,
  424. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  425. [out, ref] LPDWORD BufferSize
  426. );
  427. error_status_t
  428. FAX_SetPortEx (
  429. [in] handle_t hFaxHandle,
  430. [in] DWORD dwDeviceId,
  431. [in, ref] const PFAX_PORT_INFO_EXW pPortInfo
  432. );
  433. error_status_t
  434. FAX_EnumPortsEx (
  435. [in] handle_t hFaxHandle,
  436. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  437. [out, ref] LPDWORD BufferSize,
  438. [out, ref] LPDWORD lpdwNumPorts
  439. );
  440. //********************************************
  441. //* Extension data
  442. //********************************************
  443. error_status_t
  444. FAX_GetExtensionData (
  445. [in] handle_t hFaxHandle,
  446. [in] DWORD dwDeviceId,
  447. [in,string,ref] LPCWSTR lpctstrNameGUID,
  448. [out, size_is(,*lpdwDataSize)] LPBYTE *ppData,
  449. [out, ref] LPDWORD lpdwDataSize
  450. );
  451. error_status_t
  452. FAX_SetExtensionData (
  453. [in] handle_t hFaxHandle,
  454. [in,string] LPCWSTR lpcwstrComputerName,
  455. [in] DWORD dwDeviceId,
  456. [in,string] LPCWSTR lpctstrNameGUID,
  457. [in, ref, size_is(dwDataSize)] LPBYTE pData,
  458. [in,range(0,FAX_MAX_RPC_BUFFER)] DWORD dwDataSize
  459. );
  460. //********************************************
  461. //* Outbound routing
  462. //********************************************
  463. error_status_t
  464. FAX_AddOutboundGroup (
  465. [in] handle_t hFaxHandle,
  466. [in, string,ref] LPCWSTR lpwstrGroupName
  467. );
  468. error_status_t
  469. FAX_SetOutboundGroup (
  470. [in] handle_t hFaxHandle,
  471. [in, ref] PRPC_FAX_OUTBOUND_ROUTING_GROUPW pGroup
  472. );
  473. error_status_t
  474. FAX_RemoveOutboundGroup (
  475. [in] handle_t hFaxHandle,
  476. [in, string, ref] LPCWSTR lpwstrGroupName
  477. );
  478. error_status_t
  479. FAX_EnumOutboundGroups (
  480. [in] handle_t hFaxHandle,
  481. [out, size_is(,*lpdwDataSize)] LPBYTE *ppData,
  482. [out, ref] LPDWORD lpdwDataSize,
  483. [out, ref] LPDWORD lpdwNumGroups
  484. );
  485. error_status_t
  486. FAX_SetDeviceOrderInGroup (
  487. [in] handle_t hFaxHandle,
  488. [in, string, ref] LPCWSTR lpwstrGroupName,
  489. [in] DWORD dwDeviceId,
  490. [in] DWORD dwNewOrder
  491. );
  492. error_status_t
  493. FAX_AddOutboundRule (
  494. [in] handle_t hFaxHandle,
  495. [in] DWORD dwAreaCode,
  496. [in] DWORD dwCountryCode,
  497. [in] DWORD dwDeviceId,
  498. [in, string, unique] LPCWSTR lpwstrGroupName,
  499. [in] BOOL bUseGroup
  500. );
  501. error_status_t
  502. FAX_RemoveOutboundRule (
  503. [in] handle_t hFaxHandle,
  504. [in] DWORD dwAreaCode,
  505. [in] DWORD dwCountryCode
  506. );
  507. error_status_t
  508. FAX_SetOutboundRule (
  509. [in] handle_t hFaxHandle,
  510. [in, ref] RPC_FAX_OUTBOUND_ROUTING_RULEW* pRule
  511. );
  512. error_status_t
  513. FAX_EnumOutboundRules (
  514. [in] handle_t hFaxHandle,
  515. [out, size_is(,*lpdwDataSize)] LPBYTE *ppData,
  516. [out, ref] LPDWORD lpdwDataSize,
  517. [out, ref] LPDWORD lpdwNumRules
  518. );
  519. //********************************************
  520. //* EFSP registration
  521. //********************************************
  522. error_status_t
  523. FAX_RegisterServiceProviderEx (
  524. [in] handle_t hFaxHandle,
  525. [in,string,ref] LPCWSTR lpctstrGUID,
  526. [in,string,ref] LPCWSTR lpctstrFriendlyName,
  527. [in,string,ref] LPCWSTR lpctstrImageName,
  528. [in,string,ref] LPCWSTR lpctstrTspName,
  529. [in] DWORD dwFSPIVersion,
  530. [in] DWORD dwCapabilities
  531. );
  532. error_status_t
  533. FAX_UnregisterServiceProviderEx (
  534. [in] handle_t hFaxHandle,
  535. [in,string,ref] LPCWSTR lpctstrGUID
  536. );
  537. //********************************************
  538. //* Routing Extension unregistration
  539. //********************************************
  540. //
  541. // Registration of routing extensions is local (non-RPC)
  542. //
  543. error_status_t
  544. FAX_UnregisterRoutingExtension (
  545. [in] handle_t hFaxHandle,
  546. [in,string,ref] LPCWSTR lpctstrExtensionName
  547. );
  548. //********************************************
  549. //* Archive jobs
  550. //********************************************
  551. error_status_t
  552. FAX_StartMessagesEnum (
  553. [in] handle_t hFaxHandle,
  554. [in] FAX_ENUM_MESSAGE_FOLDER Folder,
  555. [out,ref] PRPC_FAX_MSG_ENUM_HANDLE lpHandle
  556. );
  557. error_status_t
  558. FAX_EndMessagesEnum (
  559. [in,out,ref] PRPC_FAX_MSG_ENUM_HANDLE lpHandle
  560. );
  561. error_status_t
  562. FAX_EnumMessages(
  563. [in,ref] RPC_FAX_MSG_ENUM_HANDLE hEnum,
  564. [in] DWORD dwNumMessages,
  565. [out, size_is(,*lpdwBufferSize)] LPBYTE *lppBuffer,
  566. [out, ref] LPDWORD lpdwBufferSize,
  567. [out, ref] LPDWORD lpdwNumMessagesRetrieved
  568. );
  569. error_status_t
  570. FAX_GetMessage (
  571. [in] handle_t hFaxHandle,
  572. [in] DWORDLONG dwlMessageId,
  573. [in] FAX_ENUM_MESSAGE_FOLDER Folder,
  574. [out, size_is(,*lpdwBufferSize)] LPBYTE *lppBuffer,
  575. [out, ref] LPDWORD lpdwBufferSize
  576. );
  577. error_status_t
  578. FAX_RemoveMessage (
  579. [in] handle_t hFaxHandle,
  580. [in] DWORDLONG dwlMessageId,
  581. [in] FAX_ENUM_MESSAGE_FOLDER Folder
  582. );
  583. //********************************************
  584. //* RPC copy
  585. //********************************************
  586. error_status_t
  587. FAX_StartCopyToServer (
  588. [in] handle_t hFaxHandle, // Handle to server
  589. [in,string,ref] LPCWSTR lpcwstrFileExt, // Extension of file to create on the server
  590. [in,out,string,ref] LPWSTR lpwstrServerFileName, // File name (and extension) of file created on the server
  591. [out,ref] PRPC_FAX_COPY_HANDLE lpHandle // RPC copy handle
  592. );
  593. error_status_t
  594. FAX_StartCopyMessageFromServer (
  595. [in] handle_t hFaxHandle, // Handle to server
  596. [in] DWORDLONG dwlMessageId, // Message id
  597. [in] FAX_ENUM_MESSAGE_FOLDER Folder, // Archive folder
  598. [out,ref] PRPC_FAX_COPY_HANDLE lpHandle // RPC copy handle
  599. );
  600. error_status_t
  601. FAX_WriteFile (
  602. [in,ref] RPC_FAX_COPY_HANDLE hCopy, // RPC copy handle
  603. [in,ref,size_is(dwDataSize)] const LPBYTE lpbData, // Data chunk to append to file on server
  604. [in, range(0,RPC_COPY_BUFFER_SIZE)] DWORD dwDataSize // Size of data chunk
  605. );
  606. error_status_t
  607. FAX_ReadFile (
  608. [in,ref] RPC_FAX_COPY_HANDLE hCopy, // RPC copy handle
  609. [in] DWORD dwMaxDataSize, // Maximal chunk to read
  610. [out,ref,size_is(*lpdwDataSize)] LPBYTE lpbData, // Data buffer to retrieve from server
  611. [in,out,ref] LPRANGED_DWORD lpdwDataSize // Size of data retrieved
  612. );
  613. error_status_t
  614. FAX_EndCopy (
  615. [in,out,ref] PRPC_FAX_COPY_HANDLE lphCopy
  616. );
  617. //********************************************
  618. //* Server notifications
  619. //********************************************
  620. //
  621. // FAX_StartServerNotification is obsolete. Use FAX_StartServerNotificationEx()
  622. //
  623. error_status_t
  624. FAX_StartServerNotification(
  625. [in] handle_t hBinding,
  626. [in, string, ref] LPCWSTR lpcwstrMachineName,
  627. [in, string, ref] LPCWSTR lpcwstrEndPoint,
  628. [in] ULONG64 Context,
  629. [in, ref, string] LPWSTR lpcwstrProtseqString,
  630. [in] BOOL bEventEx,
  631. [in] DWORD dwEventTypes,
  632. [out,ref] PRPC_FAX_EVENT_HANDLE lpHandle
  633. );
  634. error_status_t
  635. FAX_StartServerNotificationEx(
  636. [in] handle_t hBinding,
  637. [in, string, ref] LPCWSTR lpcwstrMachineName,
  638. [in, string, ref] LPCWSTR lpcwstrEndPoint,
  639. [in] ULONG64 Context,
  640. [in, ref, string] LPWSTR lpcwstrProtSeq, // For BOS interoperability it must be set to "ncacn_ip_tcp"
  641. [in] BOOL bEventEx,
  642. [in] DWORD dwEventTypes,
  643. [out,ref] PRPC_FAX_EVENT_EX_HANDLE lpHandle
  644. );
  645. error_status_t
  646. FAX_EndServerNotification (
  647. [in,out,ref] PRPC_FAX_EVENT_EX_HANDLE lpHandle
  648. );
  649. //********************************************
  650. //* Server activity
  651. //********************************************
  652. error_status_t
  653. FAX_GetServerActivity(
  654. [in] handle_t hFaxHandle,
  655. [in, out, ref] PFAX_SERVER_ACTIVITY pServerActivity
  656. );
  657. //********************************************
  658. //* Configuration Wizard support functions
  659. //********************************************
  660. error_status_t
  661. FAX_SetConfigWizardUsed (
  662. [in] handle_t hFaxHandle,
  663. [in] BOOL bConfigWizardUsed
  664. );
  665. //********************************************
  666. //* Routing extensions
  667. //********************************************
  668. error_status_t
  669. FAX_EnumRoutingExtensions (
  670. [in] handle_t hFaxHandle,
  671. [out, size_is(,*BufferSize)] LPBYTE *Buffer,
  672. [out, ref] LPDWORD BufferSize,
  673. [out, ref] LPDWORD lpdwNumExts
  674. );
  675. //********************************************
  676. //* Manual answering support functions
  677. //********************************************
  678. error_status_t
  679. FAX_AnswerCall(
  680. [in] handle_t hFaxHandle,
  681. [in] DWORD dwDeviceId
  682. );
  683. //********************************************
  684. //* Server / client interoperability
  685. //********************************************
  686. error_status_t
  687. FAX_ConnectFaxServer(
  688. [in] handle_t hBinding,
  689. [in] DWORD dwClientAPIVersion,
  690. [out, ref] LPDWORD lpdwServerAPIVersion,
  691. [out, ref] PRPC_FAX_SVC_HANDLE pHandle
  692. );
  693. //********************************************
  694. //* Hardening FAX_GetSecurity with an Ex
  695. //********************************************
  696. error_status_t
  697. FAX_GetSecurityEx(
  698. [in] handle_t hBinding,
  699. [in] SECURITY_INFORMATION SecurityInformation,
  700. [out, size_is(,*lpdwBufferSize)] LPBYTE * pSecurityDescriptor,
  701. [out, ref] LPDWORD lpdwBufferSize
  702. );
  703. //********************************************
  704. //* Ivalidate archive folder
  705. //********************************************
  706. error_status_t
  707. FAX_RefreshArchive(
  708. [in] handle_t hFaxHandle,
  709. [in] FAX_ENUM_MESSAGE_FOLDER Folder
  710. );
  711. //********************************************
  712. //* Start FAX_API_VERSION_2
  713. //********************************************
  714. //********************************************
  715. //* Recipients limit in a single broadcast
  716. //********************************************
  717. error_status_t
  718. FAX_SetRecipientsLimit(
  719. [in] handle_t hbinding,
  720. [in] DWORD dwRecipientsLimit
  721. );
  722. error_status_t
  723. FAX_GetRecipientsLimit(
  724. [in] handle_t hbinding,
  725. [out, ref] LPDWORD lpdwRecipientsLimit
  726. );
  727. error_status_t
  728. FAX_GetServerSKU(
  729. [in] handle_t hbinding,
  730. [out, ref] PRODUCT_SKU_TYPE* pServerSKU
  731. );
  732. //********************************************
  733. //* Checking for a valid fax folder
  734. //********************************************
  735. error_status_t
  736. FAX_CheckValidFaxFolder(
  737. [in] handle_t hBinding,
  738. [in, string, ref] LPCWSTR lpcwstrPath
  739. );
  740. }