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.

1996 lines
60 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. winfax.h
  5. Abstract:
  6. This module contains the WIN32 FAX APIs.
  7. --*/
  8. #ifndef _FAXAPI_
  9. #define _FAXAPI_
  10. #ifndef MIDL_PASS
  11. #include <tapi.h>
  12. #endif
  13. #if !defined(_WINFAX_)
  14. #define WINFAXAPI DECLSPEC_IMPORT
  15. #else
  16. #define WINFAXAPI
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. //
  22. // FAX ERROR CODES
  23. //
  24. #define FAX_ERR_START 7001L // First fax specific error code
  25. #define FAX_ERR_SRV_OUTOFMEMORY 7001L
  26. #define FAX_ERR_GROUP_NOT_FOUND 7002L
  27. #define FAX_ERR_BAD_GROUP_CONFIGURATION 7003L
  28. #define FAX_ERR_GROUP_IN_USE 7004L
  29. #define FAX_ERR_RULE_NOT_FOUND 7005L
  30. #define FAX_ERR_NOT_NTFS 7006L
  31. #define FAX_ERR_DIRECTORY_IN_USE 7007L
  32. #define FAX_ERR_FILE_ACCESS_DENIED 7008L
  33. #define FAX_ERR_MESSAGE_NOT_FOUND 7009L
  34. #define FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED 7010L
  35. #define FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU 7011L
  36. #define FAX_ERR_VERSION_MISMATCH 7012L // Fax client/server versions mismtach
  37. #define FAX_ERR_END 7012L // Last fax specific error code
  38. //
  39. // MessageId: FAX_E_SRV_OUTOFMEMORY
  40. //
  41. // MessageText:
  42. //
  43. // The fax server failed to allocate memory.
  44. //
  45. #define FAX_E_SRV_OUTOFMEMORY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_SRV_OUTOFMEMORY)
  46. //
  47. // MessageId: FAX_E_GROUP_NOT_FOUND
  48. //
  49. // MessageText:
  50. //
  51. // The fax server failed to locate an outbound routing group by name.
  52. //
  53. #define FAX_E_GROUP_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_GROUP_NOT_FOUND)
  54. //
  55. // MessageId: FAX_E_BAD_GROUP_CONFIGURATION
  56. //
  57. // MessageText:
  58. //
  59. // The fax server encountered an outbound routing group with bad configuration.
  60. //
  61. #define FAX_E_BAD_GROUP_CONFIGURATION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_BAD_GROUP_CONFIGURATION)
  62. //
  63. // MessageId: FAX_E_GROUP_IN_USE
  64. //
  65. // MessageText:
  66. //
  67. // The fax server cannot remove an outbound routing group because it is in use by one or more outbound routing rules.
  68. //
  69. #define FAX_E_GROUP_IN_USE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_GROUP_IN_USE)
  70. //
  71. // MessageId: FAX_E_RULE_NOT_FOUND
  72. //
  73. // MessageText:
  74. //
  75. // The fax server failed to locate an outbound routing rule by country code and area code.
  76. //
  77. #define FAX_E_RULE_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_RULE_NOT_FOUND)
  78. //
  79. // MessageId: FAX_E_NOT_NTFS
  80. //
  81. // MessageText:
  82. //
  83. // The fax server cannot set an archive folder to a non-NTFS partition.
  84. //
  85. #define FAX_E_NOT_NTFS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_NOT_NTFS)
  86. //
  87. // MessageId: FAX_E_DIRECTORY_IN_USE
  88. //
  89. // MessageText:
  90. //
  91. // The fax server cannot use the same folder for both the inbox and the sent-items archives.
  92. //
  93. #define FAX_E_DIRECTORY_IN_USE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_DIRECTORY_IN_USE)
  94. //
  95. // MessageId: FAX_E_FILE_ACCESS_DENIED
  96. //
  97. // MessageText:
  98. //
  99. // The fax server cannot access the specified file or folder.
  100. //
  101. #define FAX_E_FILE_ACCESS_DENIED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_FILE_ACCESS_DENIED)
  102. //
  103. // MessageId: FAX_E_MESSAGE_NOT_FOUND
  104. //
  105. // MessageText:
  106. //
  107. // The fax server cannot find the job or message by its ID.
  108. //
  109. #define FAX_E_MESSAGE_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_MESSAGE_NOT_FOUND)
  110. //
  111. // MessageId: FAX_E_DEVICE_NUM_LIMIT_EXCEEDED
  112. //
  113. // MessageText:
  114. //
  115. // The fax server cannot complete the operation because the number of active fax devices allowed for this version of Windows was exceeded.
  116. //
  117. #define FAX_E_DEVICE_NUM_LIMIT_EXCEEDED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED)
  118. //
  119. // MessageId: FAX_E_NOT_SUPPORTED_ON_THIS_SKU
  120. //
  121. // MessageText:
  122. //
  123. // The fax server cannot complete the operation because it is not supported for this version of Windows.
  124. //
  125. #define FAX_E_NOT_SUPPORTED_ON_THIS_SKU MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU)
  126. //
  127. // MessageId: FAX_E_VERSION_MISMATCH
  128. //
  129. // MessageText:
  130. //
  131. // The fax server API version does not support the requested operation.
  132. //
  133. #define FAX_E_VERSION_MISMATCH MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, FAX_ERR_VERSION_MISMATCH)
  134. typedef enum
  135. {
  136. FAXLOG_LEVEL_NONE = 0,
  137. FAXLOG_LEVEL_MIN,
  138. FAXLOG_LEVEL_MED,
  139. FAXLOG_LEVEL_MAX
  140. } FAX_ENUM_LOG_LEVELS;
  141. typedef enum
  142. {
  143. FAXLOG_CATEGORY_INIT = 1, // Initialization / shutdown
  144. FAXLOG_CATEGORY_OUTBOUND, // Outbound messages
  145. FAXLOG_CATEGORY_INBOUND, // Inbound messages
  146. FAXLOG_CATEGORY_UNKNOWN // Unknown category (all others)
  147. } FAX_ENUM_LOG_CATEGORIES;
  148. typedef struct _FAX_LOG_CATEGORYA
  149. {
  150. LPCSTR Name; // logging category name
  151. DWORD Category; // logging category number
  152. DWORD Level; // logging level for the category
  153. } FAX_LOG_CATEGORYA, *PFAX_LOG_CATEGORYA;
  154. typedef struct _FAX_LOG_CATEGORYW
  155. {
  156. LPCWSTR Name; // logging category name
  157. DWORD Category; // logging category number
  158. DWORD Level; // logging level for the category
  159. } FAX_LOG_CATEGORYW, *PFAX_LOG_CATEGORYW;
  160. #ifdef UNICODE
  161. typedef FAX_LOG_CATEGORYW FAX_LOG_CATEGORY;
  162. typedef PFAX_LOG_CATEGORYW PFAX_LOG_CATEGORY;
  163. #else
  164. typedef FAX_LOG_CATEGORYA FAX_LOG_CATEGORY;
  165. typedef PFAX_LOG_CATEGORYA PFAX_LOG_CATEGORY;
  166. #endif // UNICODE
  167. typedef struct _FAX_TIME
  168. {
  169. WORD Hour;
  170. WORD Minute;
  171. } FAX_TIME, *PFAX_TIME;
  172. typedef struct _FAX_CONFIGURATIONA
  173. {
  174. DWORD SizeOfStruct; // size of this structure
  175. DWORD Retries; // number of retries for fax send
  176. DWORD RetryDelay; // number of minutes between retries
  177. DWORD DirtyDays; // number of days to keep an unsent job in the queue
  178. BOOL Branding; // fsp should brand outgoing faxes
  179. BOOL UseDeviceTsid; // server uses device tsid only
  180. BOOL ServerCp; // clients must use cover pages on the server
  181. BOOL PauseServerQueue; // is the server queue paused?
  182. FAX_TIME StartCheapTime; // start of discount rate period
  183. FAX_TIME StopCheapTime; // end of discount rate period
  184. BOOL ArchiveOutgoingFaxes; // whether outgoing faxes should be archived
  185. LPCSTR ArchiveDirectory; // archive directory for outgoing faxes
  186. LPCSTR Reserved; // Reserved; must be NULL
  187. } FAX_CONFIGURATIONA, *PFAX_CONFIGURATIONA;
  188. typedef struct _FAX_CONFIGURATIONW
  189. {
  190. DWORD SizeOfStruct; // size of this structure
  191. DWORD Retries; // number of retries for fax send
  192. DWORD RetryDelay; // number of minutes between retries
  193. DWORD DirtyDays; // number of days to keep an unsent job in the queue
  194. BOOL Branding; // fsp should brand outgoing faxes
  195. BOOL UseDeviceTsid; // server uses device tsid only
  196. BOOL ServerCp; // clients must use cover pages on the server
  197. BOOL PauseServerQueue; // is the server queue paused?
  198. FAX_TIME StartCheapTime; // start of discount rate period
  199. FAX_TIME StopCheapTime; // end of discount rate period
  200. BOOL ArchiveOutgoingFaxes; // whether outgoing faxes should be archived
  201. LPCWSTR ArchiveDirectory; // archive directory for outgoing faxes
  202. LPCWSTR Reserved; // Reserved; must be NULL
  203. } FAX_CONFIGURATIONW, *PFAX_CONFIGURATIONW;
  204. #ifdef UNICODE
  205. typedef FAX_CONFIGURATIONW FAX_CONFIGURATION;
  206. typedef PFAX_CONFIGURATIONW PFAX_CONFIGURATION;
  207. #else
  208. typedef FAX_CONFIGURATIONA FAX_CONFIGURATION;
  209. typedef PFAX_CONFIGURATIONA PFAX_CONFIGURATION;
  210. #endif // UNICODE
  211. //
  212. // FaxSetJob() command codes
  213. //
  214. typedef enum
  215. {
  216. JC_UNKNOWN = 0,
  217. JC_DELETE,
  218. JC_PAUSE,
  219. JC_RESUME
  220. } FAX_ENUM_JOB_COMMANDS;
  221. #define JC_RESTART JC_RESUME
  222. //
  223. // job type defines
  224. //
  225. #define JT_UNKNOWN 0
  226. #define JT_SEND 1
  227. #define JT_RECEIVE 2
  228. #define JT_ROUTING 3
  229. #define JT_FAIL_RECEIVE 4
  230. //
  231. // job status defines
  232. //
  233. #define JS_PENDING 0x00000000
  234. #define JS_INPROGRESS 0x00000001
  235. #define JS_DELETING 0x00000002
  236. #define JS_FAILED 0x00000004
  237. #define JS_PAUSED 0x00000008
  238. #define JS_NOLINE 0x00000010
  239. #define JS_RETRYING 0x00000020
  240. #define JS_RETRIES_EXCEEDED 0x00000040
  241. typedef struct _FAX_DEVICE_STATUSA
  242. {
  243. DWORD SizeOfStruct; // size of this structure
  244. LPCSTR CallerId; // caller id string
  245. LPCSTR Csid; // station identifier
  246. DWORD CurrentPage; // current page
  247. DWORD DeviceId; // permanent line id
  248. LPCSTR DeviceName; // device name
  249. LPCSTR DocumentName; // document name
  250. DWORD JobType; // send or receive?
  251. LPCSTR PhoneNumber; // sending phone number
  252. LPCSTR RoutingString; // routing information
  253. LPCSTR SenderName; // sender name
  254. LPCSTR RecipientName; // recipient name
  255. DWORD Size; // size in bytes of the document
  256. FILETIME StartTime; // starting time of the fax send/receive
  257. DWORD Status; // current status of the device, see FPS_??? masks
  258. LPCSTR StatusString; // status string if the Status field is zero. this may be NULL.
  259. FILETIME SubmittedTime; // time the document was submitted
  260. DWORD TotalPages; // total number of pages in this job
  261. LPCSTR Tsid; // transmitting station identifier
  262. LPCSTR UserName; // user that submitted the active job
  263. } FAX_DEVICE_STATUSA, *PFAX_DEVICE_STATUSA;
  264. typedef struct _FAX_DEVICE_STATUSW
  265. {
  266. DWORD SizeOfStruct; // size of this structure
  267. LPCWSTR CallerId; // caller id string
  268. LPCWSTR Csid; // station identifier
  269. DWORD CurrentPage; // current page
  270. DWORD DeviceId; // permanent line id
  271. LPCWSTR DeviceName; // device name
  272. LPCWSTR DocumentName; // document name
  273. DWORD JobType; // send or receive?
  274. LPCWSTR PhoneNumber; // sending phone number
  275. LPCWSTR RoutingString; // routing information
  276. LPCWSTR SenderName; // sender name
  277. LPCWSTR RecipientName; // recipient name
  278. DWORD Size; // size in bytes of the document
  279. FILETIME StartTime; // starting time of the fax send/receive
  280. DWORD Status; // current status of the device, see FPS_??? masks
  281. LPCWSTR StatusString; // status string if the Status field is zero. this may be NULL.
  282. FILETIME SubmittedTime; // time the document was submitted
  283. DWORD TotalPages; // total number of pages in this job
  284. LPCWSTR Tsid; // transmitting station identifier
  285. LPCWSTR UserName; // user that submitted the active job
  286. } FAX_DEVICE_STATUSW, *PFAX_DEVICE_STATUSW;
  287. #ifdef UNICODE
  288. typedef FAX_DEVICE_STATUSW FAX_DEVICE_STATUS;
  289. typedef PFAX_DEVICE_STATUSW PFAX_DEVICE_STATUS;
  290. #else
  291. typedef FAX_DEVICE_STATUSA FAX_DEVICE_STATUS;
  292. typedef PFAX_DEVICE_STATUSA PFAX_DEVICE_STATUS;
  293. #endif // UNICODE
  294. typedef struct _FAX_JOB_ENTRYA
  295. {
  296. DWORD SizeOfStruct; // size of this structure
  297. DWORD JobId; // fax job id
  298. LPCSTR UserName; // user who submitted the job
  299. DWORD JobType; // job type, see JT defines
  300. DWORD QueueStatus; // job queue status, see JS defines
  301. DWORD Status; // current status of the device, see FPS_??? masks
  302. DWORD Size; // size in bytes of the document
  303. DWORD PageCount; // total page count
  304. LPCSTR RecipientNumber; // recipient fax number
  305. LPCSTR RecipientName; // recipient name
  306. LPCSTR Tsid; // transmitter's id
  307. LPCSTR SenderName; // sender name
  308. LPCSTR SenderCompany; // sender company
  309. LPCSTR SenderDept; // sender department
  310. LPCSTR BillingCode; // billing code
  311. DWORD ScheduleAction; // when to schedule the fax, see JSA defines
  312. SYSTEMTIME ScheduleTime; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  313. DWORD DeliveryReportType; // delivery report type, see DRT defines
  314. LPCSTR DeliveryReportAddress; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  315. LPCSTR DocumentName; // document name
  316. } FAX_JOB_ENTRYA, *PFAX_JOB_ENTRYA;
  317. typedef struct _FAX_JOB_ENTRYW
  318. {
  319. DWORD SizeOfStruct; // size of this structure
  320. DWORD JobId; // fax job id
  321. LPCWSTR UserName; // user who submitted the job
  322. DWORD JobType; // job type, see JT defines
  323. DWORD QueueStatus; // job queue status, see JS defines
  324. DWORD Status; // current status of the device, see FPS_??? masks
  325. DWORD Size; // size in bytes of the document
  326. DWORD PageCount; // total page count
  327. LPCWSTR RecipientNumber; // recipient fax number
  328. LPCWSTR RecipientName; // recipient name
  329. LPCWSTR Tsid; // transmitter's id
  330. LPCWSTR SenderName; // sender name
  331. LPCWSTR SenderCompany; // sender company
  332. LPCWSTR SenderDept; // sender department
  333. LPCWSTR BillingCode; // billing code
  334. DWORD ScheduleAction; // when to schedule the fax, see JSA defines
  335. SYSTEMTIME ScheduleTime; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  336. DWORD DeliveryReportType; // delivery report type, see DRT defines
  337. LPCWSTR DeliveryReportAddress; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  338. LPCWSTR DocumentName; // document name
  339. } FAX_JOB_ENTRYW, *PFAX_JOB_ENTRYW;
  340. #ifdef UNICODE
  341. typedef FAX_JOB_ENTRYW FAX_JOB_ENTRY;
  342. typedef PFAX_JOB_ENTRYW PFAX_JOB_ENTRY;
  343. #else
  344. typedef FAX_JOB_ENTRYA FAX_JOB_ENTRY;
  345. typedef PFAX_JOB_ENTRYA PFAX_JOB_ENTRY;
  346. #endif // UNICODE
  347. //
  348. // fax port state masks
  349. //
  350. // if you change these defines the be sure to
  351. // change the resources in the fax service.
  352. //
  353. #define FPS_DIALING 0x20000001
  354. #define FPS_SENDING 0x20000002
  355. #define FPS_RECEIVING 0x20000004
  356. #define FPS_COMPLETED 0x20000008
  357. #define FPS_HANDLED 0x20000010
  358. #define FPS_UNAVAILABLE 0x20000020
  359. #define FPS_BUSY 0x20000040
  360. #define FPS_NO_ANSWER 0x20000080
  361. #define FPS_BAD_ADDRESS 0x20000100
  362. #define FPS_NO_DIAL_TONE 0x20000200
  363. #define FPS_DISCONNECTED 0x20000400
  364. #define FPS_FATAL_ERROR 0x20000800
  365. #define FPS_NOT_FAX_CALL 0x20001000
  366. #define FPS_CALL_DELAYED 0x20002000
  367. #define FPS_CALL_BLACKLISTED 0x20004000
  368. #define FPS_INITIALIZING 0x20008000
  369. #define FPS_OFFLINE 0x20010000
  370. #define FPS_RINGING 0x20020000
  371. #define FPS_AVAILABLE 0x20100000
  372. #define FPS_ABORTING 0x20200000
  373. #define FPS_ROUTING 0x20400000
  374. #define FPS_ANSWERED 0x20800000
  375. //
  376. // fax port capability mask
  377. //
  378. #define FPF_RECEIVE 0x00000001 // Automatically receive faxes
  379. #define FPF_SEND 0x00000002
  380. #define FPF_VIRTUAL 0x00000004
  381. typedef struct _FAX_PORT_INFOA
  382. {
  383. DWORD SizeOfStruct; // size of this structure
  384. DWORD DeviceId; // Device ID
  385. DWORD State; // State of the device
  386. DWORD Flags; // Device specific flags
  387. DWORD Rings; // Number of rings before answer
  388. DWORD Priority; // Device priority
  389. LPCSTR DeviceName; // Device name
  390. LPCSTR Tsid; // Device Tsid
  391. LPCSTR Csid; // Device Csid
  392. } FAX_PORT_INFOA, *PFAX_PORT_INFOA;
  393. typedef struct _FAX_PORT_INFOW
  394. {
  395. DWORD SizeOfStruct; // size of this structure
  396. DWORD DeviceId; // Device ID
  397. DWORD State; // State of the device
  398. DWORD Flags; // Device specific flags
  399. DWORD Rings; // Number of rings before answer
  400. DWORD Priority; // Device priority
  401. LPCWSTR DeviceName; // Device name
  402. LPCWSTR Tsid; // Device Tsid
  403. LPCWSTR Csid; // Device Csid
  404. } FAX_PORT_INFOW, *PFAX_PORT_INFOW;
  405. #ifdef UNICODE
  406. typedef FAX_PORT_INFOW FAX_PORT_INFO;
  407. typedef PFAX_PORT_INFOW PFAX_PORT_INFO;
  408. #else
  409. typedef FAX_PORT_INFOA FAX_PORT_INFO;
  410. typedef PFAX_PORT_INFOA PFAX_PORT_INFO;
  411. #endif // UNICODE
  412. typedef struct _FAX_ROUTING_METHODA
  413. {
  414. DWORD SizeOfStruct; // size of this structure
  415. DWORD DeviceId; // device identifier
  416. BOOL Enabled; // is this method enabled for this device?
  417. LPCSTR DeviceName; // device name
  418. LPCSTR Guid; // guid that identifies this routing method
  419. LPCSTR FriendlyName; // friendly name for this method
  420. LPCSTR FunctionName; // exported function name that identifies this method
  421. LPCSTR ExtensionImageName; // module (dll) name that implements this method
  422. LPCSTR ExtensionFriendlyName; // displayable string that identifies the extension
  423. } FAX_ROUTING_METHODA, *PFAX_ROUTING_METHODA;
  424. typedef struct _FAX_ROUTING_METHODW
  425. {
  426. DWORD SizeOfStruct; // size of this structure
  427. DWORD DeviceId; // device identifier
  428. BOOL Enabled; // is this method enabled for this device?
  429. LPCWSTR DeviceName; // device name
  430. LPCWSTR Guid; // guid that identifies this routing method
  431. LPCWSTR FriendlyName; // friendly name for this method
  432. LPCWSTR FunctionName; // exported function name that identifies this method
  433. LPCWSTR ExtensionImageName; // module (dll) name that implements this method
  434. LPCWSTR ExtensionFriendlyName; // displayable string that identifies the extension
  435. } FAX_ROUTING_METHODW, *PFAX_ROUTING_METHODW;
  436. #ifdef UNICODE
  437. typedef FAX_ROUTING_METHODW FAX_ROUTING_METHOD;
  438. typedef PFAX_ROUTING_METHODW PFAX_ROUTING_METHOD;
  439. #else
  440. typedef FAX_ROUTING_METHODA FAX_ROUTING_METHOD;
  441. typedef PFAX_ROUTING_METHODA PFAX_ROUTING_METHOD;
  442. #endif // UNICODE
  443. typedef struct _FAX_GLOBAL_ROUTING_INFOA
  444. {
  445. DWORD SizeOfStruct; // size of this structure
  446. DWORD Priority; // priority of this device
  447. LPCSTR Guid; // guid that identifies this routing method
  448. LPCSTR FriendlyName; // friendly name for this method
  449. LPCSTR FunctionName; // exported function name that identifies this method
  450. LPCSTR ExtensionImageName; // module (dll) name that implements this method
  451. LPCSTR ExtensionFriendlyName; // displayable string that identifies the extension
  452. } FAX_GLOBAL_ROUTING_INFOA, *PFAX_GLOBAL_ROUTING_INFOA;
  453. typedef struct _FAX_GLOBAL_ROUTING_INFOW
  454. {
  455. DWORD SizeOfStruct; // size of this structure
  456. DWORD Priority; // priority of this device
  457. LPCWSTR Guid; // guid that identifies this routing method
  458. LPCWSTR FriendlyName; // friendly name for this method
  459. LPCWSTR FunctionName; // exported function name that identifies this method
  460. LPCWSTR ExtensionImageName; // module (dll) name that implements this method
  461. LPCWSTR ExtensionFriendlyName; // displayable string that identifies the extension
  462. } FAX_GLOBAL_ROUTING_INFOW, *PFAX_GLOBAL_ROUTING_INFOW;
  463. #ifdef UNICODE
  464. typedef FAX_GLOBAL_ROUTING_INFOW FAX_GLOBAL_ROUTING_INFO;
  465. typedef PFAX_GLOBAL_ROUTING_INFOW PFAX_GLOBAL_ROUTING_INFO;
  466. #else
  467. typedef FAX_GLOBAL_ROUTING_INFOA FAX_GLOBAL_ROUTING_INFO;
  468. typedef PFAX_GLOBAL_ROUTING_INFOA PFAX_GLOBAL_ROUTING_INFO;
  469. #endif // UNICODE
  470. typedef struct _FAX_COVERPAGE_INFOA
  471. {
  472. DWORD SizeOfStruct; // Size of this structure
  473. //
  474. // general
  475. //
  476. LPCSTR CoverPageName; // coverpage document name
  477. BOOL UseServerCoverPage; // coverpage exists on the fax server
  478. //
  479. // Recipient information
  480. //
  481. LPCSTR RecName; //
  482. LPCSTR RecFaxNumber; //
  483. LPCSTR RecCompany; //
  484. LPCSTR RecStreetAddress; //
  485. LPCSTR RecCity; //
  486. LPCSTR RecState; //
  487. LPCSTR RecZip; //
  488. LPCSTR RecCountry; //
  489. LPCSTR RecTitle; //
  490. LPCSTR RecDepartment; //
  491. LPCSTR RecOfficeLocation; //
  492. LPCSTR RecHomePhone; //
  493. LPCSTR RecOfficePhone; //
  494. //
  495. // Sender information
  496. //
  497. LPCSTR SdrName; //
  498. LPCSTR SdrFaxNumber; //
  499. LPCSTR SdrCompany; //
  500. LPCSTR SdrAddress; //
  501. LPCSTR SdrTitle; //
  502. LPCSTR SdrDepartment; //
  503. LPCSTR SdrOfficeLocation; //
  504. LPCSTR SdrHomePhone; //
  505. LPCSTR SdrOfficePhone; //
  506. //
  507. // Misc information
  508. //
  509. LPCSTR Note; //
  510. LPCSTR Subject; //
  511. SYSTEMTIME TimeSent; // Time the fax was sent
  512. DWORD PageCount; // Number of pages
  513. } FAX_COVERPAGE_INFOA, *PFAX_COVERPAGE_INFOA;
  514. typedef struct _FAX_COVERPAGE_INFOW
  515. {
  516. DWORD SizeOfStruct; // Size of this structure
  517. //
  518. // general
  519. //
  520. LPCWSTR CoverPageName; // coverpage document name
  521. BOOL UseServerCoverPage; // coverpage exists on the fax server
  522. //
  523. // Recipient information
  524. //
  525. LPCWSTR RecName; //
  526. LPCWSTR RecFaxNumber; //
  527. LPCWSTR RecCompany; //
  528. LPCWSTR RecStreetAddress; //
  529. LPCWSTR RecCity; //
  530. LPCWSTR RecState; //
  531. LPCWSTR RecZip; //
  532. LPCWSTR RecCountry; //
  533. LPCWSTR RecTitle; //
  534. LPCWSTR RecDepartment; //
  535. LPCWSTR RecOfficeLocation; //
  536. LPCWSTR RecHomePhone; //
  537. LPCWSTR RecOfficePhone; //
  538. //
  539. // Sender information
  540. //
  541. LPCWSTR SdrName; //
  542. LPCWSTR SdrFaxNumber; //
  543. LPCWSTR SdrCompany; //
  544. LPCWSTR SdrAddress; //
  545. LPCWSTR SdrTitle; //
  546. LPCWSTR SdrDepartment; //
  547. LPCWSTR SdrOfficeLocation; //
  548. LPCWSTR SdrHomePhone; //
  549. LPCWSTR SdrOfficePhone; //
  550. //
  551. // Misc information
  552. //
  553. LPCWSTR Note; //
  554. LPCWSTR Subject; //
  555. SYSTEMTIME TimeSent; // Time the fax was sent
  556. DWORD PageCount; // Number of pages
  557. } FAX_COVERPAGE_INFOW, *PFAX_COVERPAGE_INFOW;
  558. #ifdef UNICODE
  559. typedef FAX_COVERPAGE_INFOW FAX_COVERPAGE_INFO;
  560. typedef PFAX_COVERPAGE_INFOW PFAX_COVERPAGE_INFO;
  561. #else
  562. typedef FAX_COVERPAGE_INFOA FAX_COVERPAGE_INFO;
  563. typedef PFAX_COVERPAGE_INFOA PFAX_COVERPAGE_INFO;
  564. #endif // UNICODE
  565. typedef enum
  566. {
  567. JSA_NOW = 0, // Send now
  568. JSA_SPECIFIC_TIME, // Send at specific time
  569. JSA_DISCOUNT_PERIOD // Send at server configured discount period
  570. } FAX_ENUM_JOB_SEND_ATTRIBUTES;
  571. typedef enum
  572. {
  573. DRT_NONE = 0x0000, // Do not send receipt
  574. DRT_EMAIL = 0x0001, // Send receipt by email
  575. DRT_INBOX = 0x0002 // send receipt to local inbox
  576. } FAX_ENUM_DELIVERY_REPORT_TYPES;
  577. typedef struct _FAX_JOB_PARAMA
  578. {
  579. DWORD SizeOfStruct; // size of this structure
  580. LPCSTR RecipientNumber; // recipient fax number
  581. LPCSTR RecipientName; // recipient name
  582. LPCSTR Tsid; // transmitter's id
  583. LPCSTR SenderName; // sender name
  584. LPCSTR SenderCompany; // sender company
  585. LPCSTR SenderDept; // sender department
  586. LPCSTR BillingCode; // billing code
  587. DWORD ScheduleAction; // when to schedule the fax, see JSA defines
  588. SYSTEMTIME ScheduleTime; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  589. DWORD DeliveryReportType; // delivery report type, see DRT defines
  590. LPCSTR DeliveryReportAddress; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  591. LPCSTR DocumentName; // document name (optional)
  592. HCALL CallHandle; // optional call handle
  593. DWORD_PTR Reserved[3]; // reserved for ms use only
  594. } FAX_JOB_PARAMA, *PFAX_JOB_PARAMA;
  595. typedef struct _FAX_JOB_PARAMW
  596. {
  597. DWORD SizeOfStruct; // size of this structure
  598. LPCWSTR RecipientNumber; // recipient fax number
  599. LPCWSTR RecipientName; // recipient name
  600. LPCWSTR Tsid; // transmitter's id
  601. LPCWSTR SenderName; // sender name
  602. LPCWSTR SenderCompany; // sender company
  603. LPCWSTR SenderDept; // sender department
  604. LPCWSTR BillingCode; // billing code
  605. DWORD ScheduleAction; // when to schedule the fax, see JSA defines
  606. SYSTEMTIME ScheduleTime; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  607. DWORD DeliveryReportType; // delivery report type, see DRT defines
  608. LPCWSTR DeliveryReportAddress; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  609. LPCWSTR DocumentName; // document name (optional)
  610. HCALL CallHandle; // optional call handle
  611. DWORD_PTR Reserved[3]; // reserved for ms use only
  612. } FAX_JOB_PARAMW, *PFAX_JOB_PARAMW;
  613. #ifdef UNICODE
  614. typedef FAX_JOB_PARAMW FAX_JOB_PARAM;
  615. typedef PFAX_JOB_PARAMW PFAX_JOB_PARAM;
  616. #else
  617. typedef FAX_JOB_PARAMA FAX_JOB_PARAM;
  618. typedef PFAX_JOB_PARAMA PFAX_JOB_PARAM;
  619. #endif // UNICODE
  620. //
  621. // Event Ids
  622. //
  623. // FEI_NEVENTS is the number of events
  624. //
  625. #define FEI_DIALING 0x00000001
  626. #define FEI_SENDING 0x00000002
  627. #define FEI_RECEIVING 0x00000003
  628. #define FEI_COMPLETED 0x00000004
  629. #define FEI_BUSY 0x00000005
  630. #define FEI_NO_ANSWER 0x00000006
  631. #define FEI_BAD_ADDRESS 0x00000007
  632. #define FEI_NO_DIAL_TONE 0x00000008
  633. #define FEI_DISCONNECTED 0x00000009
  634. #define FEI_FATAL_ERROR 0x0000000a
  635. #define FEI_NOT_FAX_CALL 0x0000000b
  636. #define FEI_CALL_DELAYED 0x0000000c
  637. #define FEI_CALL_BLACKLISTED 0x0000000d
  638. #define FEI_RINGING 0x0000000e
  639. #define FEI_ABORTING 0x0000000f
  640. #define FEI_ROUTING 0x00000010
  641. #define FEI_MODEM_POWERED_ON 0x00000011
  642. #define FEI_MODEM_POWERED_OFF 0x00000012
  643. #define FEI_IDLE 0x00000013
  644. #define FEI_FAXSVC_ENDED 0x00000014
  645. #define FEI_ANSWERED 0x00000015
  646. #define FEI_JOB_QUEUED 0x00000016
  647. #define FEI_DELETED 0x00000017
  648. #define FEI_INITIALIZING 0x00000018
  649. #define FEI_LINE_UNAVAILABLE 0x00000019
  650. #define FEI_HANDLED 0x0000001a
  651. #define FEI_FAXSVC_STARTED 0x0000001b
  652. #define FEI_NEVENTS FEI_FAXSVC_STARTED
  653. typedef struct _FAX_EVENTA
  654. {
  655. DWORD SizeOfStruct; // Size of this structure
  656. FILETIME TimeStamp; // Timestamp for when the event was generated
  657. DWORD DeviceId; // Permanent line id
  658. DWORD EventId; // Current event id
  659. DWORD JobId; // Fax Job Id, 0xffffffff indicates inactive job
  660. } FAX_EVENTA, *PFAX_EVENTA;
  661. typedef struct _FAX_EVENTW
  662. {
  663. DWORD SizeOfStruct; // Size of this structure
  664. FILETIME TimeStamp; // Timestamp for when the event was generated
  665. DWORD DeviceId; // Permanent line id
  666. DWORD EventId; // Current event id
  667. DWORD JobId; // Fax Job Id, 0xffffffff indicates inactive job
  668. } FAX_EVENTW, *PFAX_EVENTW;
  669. #ifdef UNICODE
  670. typedef FAX_EVENTW FAX_EVENT;
  671. typedef PFAX_EVENTW PFAX_EVENT;
  672. #else
  673. typedef FAX_EVENTA FAX_EVENT;
  674. typedef PFAX_EVENTA PFAX_EVENT;
  675. #endif // UNICODE
  676. typedef struct _FAX_PRINT_INFOA
  677. {
  678. DWORD SizeOfStruct; // Size of this structure
  679. LPCSTR DocName; // Document name that appears in the spooler
  680. LPCSTR RecipientName; // Recipient name
  681. LPCSTR RecipientNumber; // Recipient fax number (non-canonical number)
  682. LPCSTR SenderName; // Sender name
  683. LPCSTR SenderCompany; // Sender company (optional)
  684. LPCSTR SenderDept; // Sender department
  685. LPCSTR SenderBillingCode; // Billing code
  686. LPCSTR Reserved; // Reserved; must be NULL
  687. LPCSTR DrEmailAddress; // E.Mail address for delivery report
  688. LPCSTR OutputFileName; // for print to file, resulting file name
  689. } FAX_PRINT_INFOA, *PFAX_PRINT_INFOA;
  690. typedef struct _FAX_PRINT_INFOW
  691. {
  692. DWORD SizeOfStruct; // Size of this structure
  693. LPCWSTR DocName; // Document name that appears in the spooler
  694. LPCWSTR RecipientName; // Recipient name
  695. LPCWSTR RecipientNumber; // Recipient fax number (non-canonical number)
  696. LPCWSTR SenderName; // Sender name
  697. LPCWSTR SenderCompany; // Sender company (optional)
  698. LPCWSTR SenderDept; // Sender department
  699. LPCWSTR SenderBillingCode; // Billing code
  700. LPCWSTR Reserved; // Reserved; must be NULL
  701. LPCWSTR DrEmailAddress; // E.Mail address for delivery report
  702. LPCWSTR OutputFileName; // for print to file, resulting file name
  703. } FAX_PRINT_INFOW, *PFAX_PRINT_INFOW;
  704. #ifdef UNICODE
  705. typedef FAX_PRINT_INFOW FAX_PRINT_INFO;
  706. typedef PFAX_PRINT_INFOW PFAX_PRINT_INFO;
  707. #else
  708. typedef FAX_PRINT_INFOA FAX_PRINT_INFO;
  709. typedef PFAX_PRINT_INFOA PFAX_PRINT_INFO;
  710. #endif // UNICODE
  711. typedef struct _FAX_CONTEXT_INFOA
  712. {
  713. DWORD SizeOfStruct; // Size of this structure
  714. HDC hDC; // Device Context
  715. CHAR ServerName[MAX_COMPUTERNAME_LENGTH+1]; // Server name
  716. } FAX_CONTEXT_INFOA, *PFAX_CONTEXT_INFOA;
  717. typedef struct _FAX_CONTEXT_INFOW
  718. {
  719. DWORD SizeOfStruct; // Size of this structure
  720. HDC hDC; // Device Context
  721. WCHAR ServerName[MAX_COMPUTERNAME_LENGTH+1]; // Server name
  722. } FAX_CONTEXT_INFOW, *PFAX_CONTEXT_INFOW;
  723. #ifdef UNICODE
  724. typedef FAX_CONTEXT_INFOW FAX_CONTEXT_INFO;
  725. typedef PFAX_CONTEXT_INFOW PFAX_CONTEXT_INFO;
  726. #else
  727. typedef FAX_CONTEXT_INFOA FAX_CONTEXT_INFO;
  728. typedef PFAX_CONTEXT_INFOA PFAX_CONTEXT_INFO;
  729. #endif // UNICODE
  730. //
  731. // prototypes
  732. //
  733. WINFAXAPI
  734. BOOL
  735. WINAPI
  736. FaxConnectFaxServerA(
  737. IN LPCSTR MachineName OPTIONAL,
  738. OUT LPHANDLE FaxHandle
  739. );
  740. WINFAXAPI
  741. BOOL
  742. WINAPI
  743. FaxConnectFaxServerW(
  744. IN LPCWSTR MachineName OPTIONAL,
  745. OUT LPHANDLE FaxHandle
  746. );
  747. #ifdef UNICODE
  748. #define FaxConnectFaxServer FaxConnectFaxServerW
  749. #else
  750. #define FaxConnectFaxServer FaxConnectFaxServerA
  751. #endif // !UNICODE
  752. typedef BOOL
  753. (WINAPI *PFAXCONNECTFAXSERVERA)(
  754. IN LPCSTR MachineName OPTIONAL,
  755. OUT LPHANDLE FaxHandle
  756. );
  757. typedef BOOL
  758. (WINAPI *PFAXCONNECTFAXSERVERW)(
  759. IN LPCWSTR MachineName OPTIONAL,
  760. OUT LPHANDLE FaxHandle
  761. );
  762. #ifdef UNICODE
  763. #define PFAXCONNECTFAXSERVER PFAXCONNECTFAXSERVERW
  764. #else
  765. #define PFAXCONNECTFAXSERVER PFAXCONNECTFAXSERVERA
  766. #endif // !UNICODE
  767. WINFAXAPI
  768. BOOL
  769. WINAPI
  770. FaxClose(
  771. IN HANDLE FaxHandle
  772. );
  773. typedef BOOL
  774. (WINAPI *PFAXCLOSE)(
  775. IN HANDLE FaxHandle
  776. );
  777. typedef enum
  778. {
  779. PORT_OPEN_QUERY = 1,
  780. PORT_OPEN_MODIFY
  781. } FAX_ENUM_PORT_OPEN_TYPE;
  782. WINFAXAPI
  783. BOOL
  784. WINAPI
  785. FaxOpenPort(
  786. IN HANDLE FaxHandle,
  787. IN DWORD DeviceId,
  788. IN DWORD Flags,
  789. OUT LPHANDLE FaxPortHandle
  790. );
  791. typedef BOOL
  792. (WINAPI *PFAXOPENPORT)(
  793. IN HANDLE FaxHandle,
  794. IN DWORD DeviceId,
  795. IN DWORD Flags,
  796. OUT LPHANDLE FaxPortHandle
  797. );
  798. WINFAXAPI
  799. BOOL
  800. WINAPI
  801. FaxCompleteJobParamsA(
  802. IN OUT PFAX_JOB_PARAMA *JobParams,
  803. IN OUT PFAX_COVERPAGE_INFOA *CoverpageInfo
  804. );
  805. WINFAXAPI
  806. BOOL
  807. WINAPI
  808. FaxCompleteJobParamsW(
  809. IN OUT PFAX_JOB_PARAMW *JobParams,
  810. IN OUT PFAX_COVERPAGE_INFOW *CoverpageInfo
  811. );
  812. #ifdef UNICODE
  813. #define FaxCompleteJobParams FaxCompleteJobParamsW
  814. #else
  815. #define FaxCompleteJobParams FaxCompleteJobParamsA
  816. #endif // !UNICODE
  817. typedef BOOL
  818. (WINAPI *PFAXCOMPLETEJOBPARAMSA)(
  819. IN OUT PFAX_JOB_PARAMA *JobParams,
  820. IN OUT PFAX_COVERPAGE_INFOA *CoverpageInfo
  821. );
  822. typedef BOOL
  823. (WINAPI *PFAXCOMPLETEJOBPARAMSW)(
  824. IN OUT PFAX_JOB_PARAMW *JobParams,
  825. IN OUT PFAX_COVERPAGE_INFOW *CoverpageInfo
  826. );
  827. #ifdef UNICODE
  828. #define PFAXCOMPLETEJOBPARAMS PFAXCOMPLETEJOBPARAMSW
  829. #else
  830. #define PFAXCOMPLETEJOBPARAMS PFAXCOMPLETEJOBPARAMSA
  831. #endif // !UNICODE
  832. WINFAXAPI
  833. BOOL
  834. WINAPI
  835. FaxSendDocumentA(
  836. IN HANDLE FaxHandle,
  837. IN LPCSTR FileName,
  838. IN PFAX_JOB_PARAMA JobParams,
  839. IN const FAX_COVERPAGE_INFOA *CoverpageInfo, OPTIONAL
  840. OUT LPDWORD FaxJobId OPTIONAL
  841. );
  842. WINFAXAPI
  843. BOOL
  844. WINAPI
  845. FaxSendDocumentW(
  846. IN HANDLE FaxHandle,
  847. IN LPCWSTR FileName,
  848. IN PFAX_JOB_PARAMW JobParams,
  849. IN const FAX_COVERPAGE_INFOW *CoverpageInfo, OPTIONAL
  850. OUT LPDWORD FaxJobId OPTIONAL
  851. );
  852. #ifdef UNICODE
  853. #define FaxSendDocument FaxSendDocumentW
  854. #else
  855. #define FaxSendDocument FaxSendDocumentA
  856. #endif // !UNICODE
  857. typedef BOOL
  858. (WINAPI *PFAXSENDDOCUMENTA)(
  859. IN HANDLE FaxHandle,
  860. IN LPCSTR FileName,
  861. IN PFAX_JOB_PARAMA JobParams,
  862. IN const FAX_COVERPAGE_INFOA *CoverpageInfo, OPTIONAL
  863. OUT LPDWORD FaxJobId OPTIONAL
  864. );
  865. typedef BOOL
  866. (WINAPI *PFAXSENDDOCUMENTW)(
  867. IN HANDLE FaxHandle,
  868. IN LPCWSTR FileName,
  869. IN PFAX_JOB_PARAMW JobParams,
  870. IN const FAX_COVERPAGE_INFOW *CoverpageInfo, OPTIONAL
  871. OUT LPDWORD FaxJobId OPTIONAL
  872. );
  873. #ifdef UNICODE
  874. #define PFAXSENDDOCUMENT PFAXSENDDOCUMENTW
  875. #else
  876. #define PFAXSENDDOCUMENT PFAXSENDDOCUMENTA
  877. #endif // !UNICODE
  878. typedef BOOL
  879. (CALLBACK *PFAX_RECIPIENT_CALLBACKA)(
  880. IN HANDLE FaxHandle,
  881. IN DWORD RecipientNumber,
  882. IN LPVOID Context,
  883. IN OUT PFAX_JOB_PARAMA JobParams,
  884. IN OUT PFAX_COVERPAGE_INFOA CoverpageInfo OPTIONAL
  885. );
  886. typedef BOOL
  887. (CALLBACK *PFAX_RECIPIENT_CALLBACKW)(
  888. IN HANDLE FaxHandle,
  889. IN DWORD RecipientNumber,
  890. IN LPVOID Context,
  891. IN OUT PFAX_JOB_PARAMW JobParams,
  892. IN OUT PFAX_COVERPAGE_INFOW CoverpageInfo OPTIONAL
  893. );
  894. #ifdef UNICODE
  895. #define PFAX_RECIPIENT_CALLBACK PFAX_RECIPIENT_CALLBACKW
  896. #else
  897. #define PFAX_RECIPIENT_CALLBACK PFAX_RECIPIENT_CALLBACKA
  898. #endif // !UNICODE
  899. WINFAXAPI
  900. BOOL
  901. WINAPI
  902. FaxSendDocumentForBroadcastA(
  903. IN HANDLE FaxHandle,
  904. IN LPCSTR FileName,
  905. OUT LPDWORD FaxJobId,
  906. IN PFAX_RECIPIENT_CALLBACKA FaxRecipientCallback,
  907. IN LPVOID Context
  908. );
  909. WINFAXAPI
  910. BOOL
  911. WINAPI
  912. FaxSendDocumentForBroadcastW(
  913. IN HANDLE FaxHandle,
  914. IN LPCWSTR FileName,
  915. OUT LPDWORD FaxJobId,
  916. IN PFAX_RECIPIENT_CALLBACKW FaxRecipientCallback,
  917. IN LPVOID Context
  918. );
  919. #ifdef UNICODE
  920. #define FaxSendDocumentForBroadcast FaxSendDocumentForBroadcastW
  921. #else
  922. #define FaxSendDocumentForBroadcast FaxSendDocumentForBroadcastA
  923. #endif // !UNICODE
  924. typedef BOOL
  925. (WINAPI *PFAXSENDDOCUMENTFORBROADCASTA)(
  926. IN HANDLE FaxHandle,
  927. IN LPCSTR FileName,
  928. OUT LPDWORD FaxJobId,
  929. IN PFAX_RECIPIENT_CALLBACKA FaxRecipientCallback,
  930. IN LPVOID Context
  931. );
  932. typedef BOOL
  933. (WINAPI *PFAXSENDDOCUMENTFORBROADCASTW)(
  934. IN HANDLE FaxHandle,
  935. IN LPCWSTR FileName,
  936. OUT LPDWORD FaxJobId,
  937. IN PFAX_RECIPIENT_CALLBACKW FaxRecipientCallback,
  938. IN LPVOID Context
  939. );
  940. #ifdef UNICODE
  941. #define PFAXSENDDOCUMENTFORBROADCAST PFAXSENDDOCUMENTFORBROADCASTW
  942. #else
  943. #define PFAXSENDDOCUMENTFORBROADCAST PFAXSENDDOCUMENTFORBROADCASTA
  944. #endif // !UNICODE
  945. WINFAXAPI
  946. BOOL
  947. WINAPI
  948. FaxEnumJobsA(
  949. IN HANDLE FaxHandle,
  950. OUT PFAX_JOB_ENTRYA *JobEntry,
  951. OUT LPDWORD JobsReturned
  952. );
  953. WINFAXAPI
  954. BOOL
  955. WINAPI
  956. FaxEnumJobsW(
  957. IN HANDLE FaxHandle,
  958. OUT PFAX_JOB_ENTRYW *JobEntry,
  959. OUT LPDWORD JobsReturned
  960. );
  961. #ifdef UNICODE
  962. #define FaxEnumJobs FaxEnumJobsW
  963. #else
  964. #define FaxEnumJobs FaxEnumJobsA
  965. #endif // !UNICODE
  966. typedef BOOL
  967. (WINAPI *PFAXENUMJOBSA)(
  968. IN HANDLE FaxHandle,
  969. OUT PFAX_JOB_ENTRYA *JobEntry,
  970. OUT LPDWORD JobsReturned
  971. );
  972. typedef BOOL
  973. (WINAPI *PFAXENUMJOBSW)(
  974. IN HANDLE FaxHandle,
  975. OUT PFAX_JOB_ENTRYW *JobEntry,
  976. OUT LPDWORD JobsReturned
  977. );
  978. #ifdef UNICODE
  979. #define PFAXENUMJOBS PFAXENUMJOBSW
  980. #else
  981. #define PFAXENUMJOBS PFAXENUMJOBSA
  982. #endif // !UNICODE
  983. WINFAXAPI
  984. BOOL
  985. WINAPI
  986. FaxGetJobA(
  987. IN HANDLE FaxHandle,
  988. IN DWORD JobId,
  989. OUT PFAX_JOB_ENTRYA *JobEntry
  990. );
  991. WINFAXAPI
  992. BOOL
  993. WINAPI
  994. FaxGetJobW(
  995. IN HANDLE FaxHandle,
  996. IN DWORD JobId,
  997. OUT PFAX_JOB_ENTRYW *JobEntry
  998. );
  999. #ifdef UNICODE
  1000. #define FaxGetJob FaxGetJobW
  1001. #else
  1002. #define FaxGetJob FaxGetJobA
  1003. #endif // !UNICODE
  1004. typedef BOOL
  1005. (WINAPI *PFAXGETJOBA)(
  1006. IN HANDLE FaxHandle,
  1007. IN DWORD JobId,
  1008. OUT PFAX_JOB_ENTRYA *JobEntry
  1009. );
  1010. typedef BOOL
  1011. (WINAPI *PFAXGETJOBW)(
  1012. IN HANDLE FaxHandle,
  1013. IN DWORD JobId,
  1014. OUT PFAX_JOB_ENTRYW *JobEntry
  1015. );
  1016. #ifdef UNICODE
  1017. #define PFAXGETJOB PFAXGETJOBW
  1018. #else
  1019. #define PFAXGETJOB PFAXGETJOBA
  1020. #endif // !UNICODE
  1021. WINFAXAPI
  1022. BOOL
  1023. WINAPI
  1024. FaxSetJobA(
  1025. IN HANDLE FaxHandle,
  1026. IN DWORD JobId,
  1027. IN DWORD Command,
  1028. IN const FAX_JOB_ENTRYA *JobEntry
  1029. );
  1030. WINFAXAPI
  1031. BOOL
  1032. WINAPI
  1033. FaxSetJobW(
  1034. IN HANDLE FaxHandle,
  1035. IN DWORD JobId,
  1036. IN DWORD Command,
  1037. IN const FAX_JOB_ENTRYW *JobEntry
  1038. );
  1039. #ifdef UNICODE
  1040. #define FaxSetJob FaxSetJobW
  1041. #else
  1042. #define FaxSetJob FaxSetJobA
  1043. #endif // !UNICODE
  1044. typedef BOOL
  1045. (WINAPI *PFAXSETJOBA)(
  1046. IN HANDLE FaxHandle,
  1047. IN DWORD JobId,
  1048. IN DWORD Command,
  1049. IN const FAX_JOB_ENTRYA *JobEntry
  1050. );
  1051. typedef BOOL
  1052. (WINAPI *PFAXSETJOBW)(
  1053. IN HANDLE FaxHandle,
  1054. IN DWORD JobId,
  1055. IN DWORD Command,
  1056. IN const FAX_JOB_ENTRYW *JobEntry
  1057. );
  1058. #ifdef UNICODE
  1059. #define PFAXSETJOB PFAXSETJOBW
  1060. #else
  1061. #define PFAXSETJOB PFAXSETJOBA
  1062. #endif // !UNICODE
  1063. WINFAXAPI
  1064. BOOL
  1065. WINAPI
  1066. FaxGetPageData(
  1067. IN HANDLE FaxHandle,
  1068. IN DWORD JobId,
  1069. OUT LPBYTE *Buffer,
  1070. OUT LPDWORD BufferSize,
  1071. OUT LPDWORD ImageWidth,
  1072. OUT LPDWORD ImageHeight
  1073. );
  1074. typedef BOOL
  1075. (WINAPI *PFAXGETPAGEDATA)(
  1076. IN HANDLE FaxHandle,
  1077. IN DWORD JobId,
  1078. OUT LPBYTE *Buffer,
  1079. OUT LPDWORD BufferSize,
  1080. OUT LPDWORD ImageWidth,
  1081. OUT LPDWORD ImageHeight
  1082. );
  1083. WINFAXAPI
  1084. BOOL
  1085. WINAPI
  1086. FaxGetDeviceStatusA(
  1087. IN HANDLE FaxPortHandle,
  1088. OUT PFAX_DEVICE_STATUSA *DeviceStatus
  1089. );
  1090. WINFAXAPI
  1091. BOOL
  1092. WINAPI
  1093. FaxGetDeviceStatusW(
  1094. IN HANDLE FaxPortHandle,
  1095. OUT PFAX_DEVICE_STATUSW *DeviceStatus
  1096. );
  1097. #ifdef UNICODE
  1098. #define FaxGetDeviceStatus FaxGetDeviceStatusW
  1099. #else
  1100. #define FaxGetDeviceStatus FaxGetDeviceStatusA
  1101. #endif // !UNICODE
  1102. typedef BOOL
  1103. (WINAPI *PFAXGETDEVICESTATUSA)(
  1104. IN HANDLE FaxPortHandle,
  1105. OUT PFAX_DEVICE_STATUSA *DeviceStatus
  1106. );
  1107. typedef BOOL
  1108. (WINAPI *PFAXGETDEVICESTATUSW)(
  1109. IN HANDLE FaxPortHandle,
  1110. OUT PFAX_DEVICE_STATUSW *DeviceStatus
  1111. );
  1112. #ifdef UNICODE
  1113. #define PFAXGETDEVICESTATUS PFAXGETDEVICESTATUSW
  1114. #else
  1115. #define PFAXGETDEVICESTATUS PFAXGETDEVICESTATUSA
  1116. #endif // !UNICODE
  1117. WINFAXAPI
  1118. BOOL
  1119. WINAPI
  1120. FaxAbort(
  1121. IN HANDLE FaxHandle,
  1122. IN DWORD JobId
  1123. );
  1124. typedef BOOL
  1125. (WINAPI *PFAXABORT)(
  1126. IN HANDLE FaxHandle,
  1127. IN DWORD JobId
  1128. );
  1129. WINFAXAPI
  1130. BOOL
  1131. WINAPI
  1132. FaxGetConfigurationA(
  1133. IN HANDLE FaxHandle,
  1134. OUT PFAX_CONFIGURATIONA *FaxConfig
  1135. );
  1136. WINFAXAPI
  1137. BOOL
  1138. WINAPI
  1139. FaxGetConfigurationW(
  1140. IN HANDLE FaxHandle,
  1141. OUT PFAX_CONFIGURATIONW *FaxConfig
  1142. );
  1143. #ifdef UNICODE
  1144. #define FaxGetConfiguration FaxGetConfigurationW
  1145. #else
  1146. #define FaxGetConfiguration FaxGetConfigurationA
  1147. #endif // !UNICODE
  1148. typedef BOOL
  1149. (WINAPI *PFAXGETCONFIGURATIONA)(
  1150. IN HANDLE FaxHandle,
  1151. OUT PFAX_CONFIGURATIONA *FaxConfig
  1152. );
  1153. typedef BOOL
  1154. (WINAPI *PFAXGETCONFIGURATIONW)(
  1155. IN HANDLE FaxHandle,
  1156. OUT PFAX_CONFIGURATIONW *FaxConfig
  1157. );
  1158. #ifdef UNICODE
  1159. #define PFAXGETCONFIGURATION PFAXGETCONFIGURATIONW
  1160. #else
  1161. #define PFAXGETCONFIGURATION PFAXGETCONFIGURATIONA
  1162. #endif // !UNICODE
  1163. WINFAXAPI
  1164. BOOL
  1165. WINAPI
  1166. FaxSetConfigurationA(
  1167. IN HANDLE FaxHandle,
  1168. IN const FAX_CONFIGURATIONA *FaxConfig
  1169. );
  1170. WINFAXAPI
  1171. BOOL
  1172. WINAPI
  1173. FaxSetConfigurationW(
  1174. IN HANDLE FaxHandle,
  1175. IN const FAX_CONFIGURATIONW *FaxConfig
  1176. );
  1177. #ifdef UNICODE
  1178. #define FaxSetConfiguration FaxSetConfigurationW
  1179. #else
  1180. #define FaxSetConfiguration FaxSetConfigurationA
  1181. #endif // !UNICODE
  1182. typedef BOOL
  1183. (WINAPI *PFAXSETCONFIGURATIONA)(
  1184. IN HANDLE FaxHandle,
  1185. IN const FAX_CONFIGURATIONA *FaxConfig
  1186. );
  1187. typedef BOOL
  1188. (WINAPI *PFAXSETCONFIGURATIONW)(
  1189. IN HANDLE FaxHandle,
  1190. IN const FAX_CONFIGURATIONW *FaxConfig
  1191. );
  1192. #ifdef UNICODE
  1193. #define PFAXSETCONFIGURATION PFAXSETCONFIGURATIONW
  1194. #else
  1195. #define PFAXSETCONFIGURATION PFAXSETCONFIGURATIONA
  1196. #endif // !UNICODE
  1197. WINFAXAPI
  1198. BOOL
  1199. WINAPI
  1200. FaxGetLoggingCategoriesA(
  1201. IN HANDLE FaxHandle,
  1202. OUT PFAX_LOG_CATEGORYA *Categories,
  1203. OUT LPDWORD NumberCategories
  1204. );
  1205. WINFAXAPI
  1206. BOOL
  1207. WINAPI
  1208. FaxGetLoggingCategoriesW(
  1209. IN HANDLE FaxHandle,
  1210. OUT PFAX_LOG_CATEGORYW *Categories,
  1211. OUT LPDWORD NumberCategories
  1212. );
  1213. #ifdef UNICODE
  1214. #define FaxGetLoggingCategories FaxGetLoggingCategoriesW
  1215. #else
  1216. #define FaxGetLoggingCategories FaxGetLoggingCategoriesA
  1217. #endif // !UNICODE
  1218. typedef BOOL
  1219. (WINAPI *PFAXGETLOGGINGCATEGORIESA)(
  1220. IN HANDLE FaxHandle,
  1221. OUT PFAX_LOG_CATEGORYA *Categories,
  1222. OUT LPDWORD NumberCategories
  1223. );
  1224. typedef BOOL
  1225. (WINAPI *PFAXGETLOGGINGCATEGORIESW)(
  1226. IN HANDLE FaxHandle,
  1227. OUT PFAX_LOG_CATEGORYW *Categories,
  1228. OUT LPDWORD NumberCategories
  1229. );
  1230. #ifdef UNICODE
  1231. #define PFAXGETLOGGINGCATEGORIES PFAXGETLOGGINGCATEGORIESW
  1232. #else
  1233. #define PFAXGETLOGGINGCATEGORIES PFAXGETLOGGINGCATEGORIESA
  1234. #endif // !UNICODE
  1235. WINFAXAPI
  1236. BOOL
  1237. WINAPI
  1238. FaxSetLoggingCategoriesA(
  1239. IN HANDLE FaxHandle,
  1240. IN const FAX_LOG_CATEGORYA *Categories,
  1241. IN DWORD NumberCategories
  1242. );
  1243. WINFAXAPI
  1244. BOOL
  1245. WINAPI
  1246. FaxSetLoggingCategoriesW(
  1247. IN HANDLE FaxHandle,
  1248. IN const FAX_LOG_CATEGORYW *Categories,
  1249. IN DWORD NumberCategories
  1250. );
  1251. #ifdef UNICODE
  1252. #define FaxSetLoggingCategories FaxSetLoggingCategoriesW
  1253. #else
  1254. #define FaxSetLoggingCategories FaxSetLoggingCategoriesA
  1255. #endif // !UNICODE
  1256. typedef BOOL
  1257. (WINAPI *PFAXSETLOGGINGCATEGORIESA)(
  1258. IN HANDLE FaxHandle,
  1259. IN const FAX_LOG_CATEGORYA *Categories,
  1260. IN DWORD NumberCategories
  1261. );
  1262. typedef BOOL
  1263. (WINAPI *PFAXSETLOGGINGCATEGORIESW)(
  1264. IN HANDLE FaxHandle,
  1265. IN const FAX_LOG_CATEGORYW *Categories,
  1266. IN DWORD NumberCategories
  1267. );
  1268. #ifdef UNICODE
  1269. #define PFAXSETLOGGINGCATEGORIES PFAXSETLOGGINGCATEGORIESW
  1270. #else
  1271. #define PFAXSETLOGGINGCATEGORIES PFAXSETLOGGINGCATEGORIESA
  1272. #endif // !UNICODE
  1273. WINFAXAPI
  1274. BOOL
  1275. WINAPI
  1276. FaxEnumPortsA(
  1277. IN HANDLE FaxHandle,
  1278. OUT PFAX_PORT_INFOA *PortInfo,
  1279. OUT LPDWORD PortsReturned
  1280. );
  1281. WINFAXAPI
  1282. BOOL
  1283. WINAPI
  1284. FaxEnumPortsW(
  1285. IN HANDLE FaxHandle,
  1286. OUT PFAX_PORT_INFOW *PortInfo,
  1287. OUT LPDWORD PortsReturned
  1288. );
  1289. #ifdef UNICODE
  1290. #define FaxEnumPorts FaxEnumPortsW
  1291. #else
  1292. #define FaxEnumPorts FaxEnumPortsA
  1293. #endif // !UNICODE
  1294. typedef BOOL
  1295. (WINAPI *PFAXENUMPORTSA)(
  1296. IN HANDLE FaxHandle,
  1297. OUT PFAX_PORT_INFOA *PortInfo,
  1298. OUT LPDWORD PortsReturned
  1299. );
  1300. typedef BOOL
  1301. (WINAPI *PFAXENUMPORTSW)(
  1302. IN HANDLE FaxHandle,
  1303. OUT PFAX_PORT_INFOW *PortInfo,
  1304. OUT LPDWORD PortsReturned
  1305. );
  1306. #ifdef UNICODE
  1307. #define PFAXENUMPORTS PFAXENUMPORTSW
  1308. #else
  1309. #define PFAXENUMPORTS PFAXENUMPORTSA
  1310. #endif // !UNICODE
  1311. WINFAXAPI
  1312. BOOL
  1313. WINAPI
  1314. FaxGetPortA(
  1315. IN HANDLE FaxPortHandle,
  1316. OUT PFAX_PORT_INFOA *PortInfo
  1317. );
  1318. WINFAXAPI
  1319. BOOL
  1320. WINAPI
  1321. FaxGetPortW(
  1322. IN HANDLE FaxPortHandle,
  1323. OUT PFAX_PORT_INFOW *PortInfo
  1324. );
  1325. #ifdef UNICODE
  1326. #define FaxGetPort FaxGetPortW
  1327. #else
  1328. #define FaxGetPort FaxGetPortA
  1329. #endif // !UNICODE
  1330. typedef BOOL
  1331. (WINAPI *PFAXGETPORTA)(
  1332. IN HANDLE FaxPortHandle,
  1333. OUT PFAX_PORT_INFOA *PortInfo
  1334. );
  1335. typedef BOOL
  1336. (WINAPI *PFAXGETPORTW)(
  1337. IN HANDLE FaxPortHandle,
  1338. OUT PFAX_PORT_INFOW *PortInfo
  1339. );
  1340. #ifdef UNICODE
  1341. #define PFAXGETPORT PFAXGETPORTW
  1342. #else
  1343. #define PFAXGETPORT PFAXGETPORTA
  1344. #endif // !UNICODE
  1345. WINFAXAPI
  1346. BOOL
  1347. WINAPI
  1348. FaxSetPortA(
  1349. IN HANDLE FaxPortHandle,
  1350. IN const FAX_PORT_INFOA *PortInfo
  1351. );
  1352. WINFAXAPI
  1353. BOOL
  1354. WINAPI
  1355. FaxSetPortW(
  1356. IN HANDLE FaxPortHandle,
  1357. IN const FAX_PORT_INFOW *PortInfo
  1358. );
  1359. #ifdef UNICODE
  1360. #define FaxSetPort FaxSetPortW
  1361. #else
  1362. #define FaxSetPort FaxSetPortA
  1363. #endif // !UNICODE
  1364. typedef BOOL
  1365. (WINAPI *PFAXSETPORTA)(
  1366. IN HANDLE FaxPortHandle,
  1367. IN const FAX_PORT_INFOA *PortInfo
  1368. );
  1369. typedef BOOL
  1370. (WINAPI *PFAXSETPORTW)(
  1371. IN HANDLE FaxPortHandle,
  1372. IN const FAX_PORT_INFOW *PortInfo
  1373. );
  1374. #ifdef UNICODE
  1375. #define PFAXSETPORT PFAXSETPORTW
  1376. #else
  1377. #define PFAXSETPORT PFAXSETPORTA
  1378. #endif // !UNICODE
  1379. WINFAXAPI
  1380. BOOL
  1381. WINAPI
  1382. FaxEnumRoutingMethodsA(
  1383. IN HANDLE FaxPortHandle,
  1384. OUT PFAX_ROUTING_METHODA *RoutingMethod,
  1385. OUT LPDWORD MethodsReturned
  1386. );
  1387. WINFAXAPI
  1388. BOOL
  1389. WINAPI
  1390. FaxEnumRoutingMethodsW(
  1391. IN HANDLE FaxPortHandle,
  1392. OUT PFAX_ROUTING_METHODW *RoutingMethod,
  1393. OUT LPDWORD MethodsReturned
  1394. );
  1395. #ifdef UNICODE
  1396. #define FaxEnumRoutingMethods FaxEnumRoutingMethodsW
  1397. #else
  1398. #define FaxEnumRoutingMethods FaxEnumRoutingMethodsA
  1399. #endif // !UNICODE
  1400. typedef BOOL
  1401. (WINAPI *PFAXENUMROUTINGMETHODSA)(
  1402. IN HANDLE FaxPortHandle,
  1403. OUT PFAX_ROUTING_METHODA *RoutingMethod,
  1404. OUT LPDWORD MethodsReturned
  1405. );
  1406. typedef BOOL
  1407. (WINAPI *PFAXENUMROUTINGMETHODSW)(
  1408. IN HANDLE FaxPortHandle,
  1409. OUT PFAX_ROUTING_METHODW *RoutingMethod,
  1410. OUT LPDWORD MethodsReturned
  1411. );
  1412. #ifdef UNICODE
  1413. #define PFAXENUMROUTINGMETHODS PFAXENUMROUTINGMETHODSW
  1414. #else
  1415. #define PFAXENUMROUTINGMETHODS PFAXENUMROUTINGMETHODSA
  1416. #endif // !UNICODE
  1417. WINFAXAPI
  1418. BOOL
  1419. WINAPI
  1420. FaxEnableRoutingMethodA(
  1421. IN HANDLE FaxPortHandle,
  1422. IN LPCSTR RoutingGuid,
  1423. IN BOOL Enabled
  1424. );
  1425. WINFAXAPI
  1426. BOOL
  1427. WINAPI
  1428. FaxEnableRoutingMethodW(
  1429. IN HANDLE FaxPortHandle,
  1430. IN LPCWSTR RoutingGuid,
  1431. IN BOOL Enabled
  1432. );
  1433. #ifdef UNICODE
  1434. #define FaxEnableRoutingMethod FaxEnableRoutingMethodW
  1435. #else
  1436. #define FaxEnableRoutingMethod FaxEnableRoutingMethodA
  1437. #endif // !UNICODE
  1438. typedef BOOL
  1439. (WINAPI *PFAXENABLEROUTINGMETHODA)(
  1440. IN HANDLE FaxPortHandle,
  1441. IN LPCSTR RoutingGuid,
  1442. IN BOOL Enabled
  1443. );
  1444. typedef BOOL
  1445. (WINAPI *PFAXENABLEROUTINGMETHODW)(
  1446. IN HANDLE FaxPortHandle,
  1447. IN LPCWSTR RoutingGuid,
  1448. IN BOOL Enabled
  1449. );
  1450. #ifdef UNICODE
  1451. #define PFAXENABLEROUTINGMETHOD PFAXENABLEROUTINGMETHODW
  1452. #else
  1453. #define PFAXENABLEROUTINGMETHOD PFAXENABLEROUTINGMETHODA
  1454. #endif // !UNICODE
  1455. WINFAXAPI
  1456. BOOL
  1457. WINAPI
  1458. FaxEnumGlobalRoutingInfoA(
  1459. IN HANDLE FaxHandle,
  1460. OUT PFAX_GLOBAL_ROUTING_INFOA *RoutingInfo,
  1461. OUT LPDWORD MethodsReturned
  1462. );
  1463. WINFAXAPI
  1464. BOOL
  1465. WINAPI
  1466. FaxEnumGlobalRoutingInfoW(
  1467. IN HANDLE FaxHandle,
  1468. OUT PFAX_GLOBAL_ROUTING_INFOW *RoutingInfo,
  1469. OUT LPDWORD MethodsReturned
  1470. );
  1471. #ifdef UNICODE
  1472. #define FaxEnumGlobalRoutingInfo FaxEnumGlobalRoutingInfoW
  1473. #else
  1474. #define FaxEnumGlobalRoutingInfo FaxEnumGlobalRoutingInfoA
  1475. #endif // !UNICODE
  1476. typedef BOOL
  1477. (WINAPI *PFAXENUMGLOBALROUTINGINFOA)(
  1478. IN HANDLE FaxHandle,
  1479. OUT PFAX_GLOBAL_ROUTING_INFOA *RoutingInfo,
  1480. OUT LPDWORD MethodsReturned
  1481. );
  1482. typedef BOOL
  1483. (WINAPI *PFAXENUMGLOBALROUTINGINFOW)(
  1484. IN HANDLE FaxHandle,
  1485. OUT PFAX_GLOBAL_ROUTING_INFOW *RoutingInfo,
  1486. OUT LPDWORD MethodsReturned
  1487. );
  1488. #ifdef UNICODE
  1489. #define PFAXENUMGLOBALROUTINGINFO PFAXENUMGLOBALROUTINGINFOW
  1490. #else
  1491. #define PFAXENUMGLOBALROUTINGINFO PFAXENUMGLOBALROUTINGINFOA
  1492. #endif // !UNICODE
  1493. WINFAXAPI
  1494. BOOL
  1495. WINAPI
  1496. FaxSetGlobalRoutingInfoA(
  1497. IN HANDLE FaxHandle,
  1498. IN const FAX_GLOBAL_ROUTING_INFOA *RoutingInfo
  1499. );
  1500. WINFAXAPI
  1501. BOOL
  1502. WINAPI
  1503. FaxSetGlobalRoutingInfoW(
  1504. IN HANDLE FaxHandle,
  1505. IN const FAX_GLOBAL_ROUTING_INFOW *RoutingInfo
  1506. );
  1507. #ifdef UNICODE
  1508. #define FaxSetGlobalRoutingInfo FaxSetGlobalRoutingInfoW
  1509. #else
  1510. #define FaxSetGlobalRoutingInfo FaxSetGlobalRoutingInfoA
  1511. #endif // !UNICODE
  1512. typedef BOOL
  1513. (WINAPI *PFAXSETGLOBALROUTINGINFOA)(
  1514. IN HANDLE FaxPortHandle,
  1515. IN const FAX_GLOBAL_ROUTING_INFOA *RoutingInfo
  1516. );
  1517. typedef BOOL
  1518. (WINAPI *PFAXSETGLOBALROUTINGINFOW)(
  1519. IN HANDLE FaxPortHandle,
  1520. IN const FAX_GLOBAL_ROUTING_INFOW *RoutingInfo
  1521. );
  1522. #ifdef UNICODE
  1523. #define PFAXSETGLOBALROUTINGINFO PFAXSETGLOBALROUTINGINFOW
  1524. #else
  1525. #define PFAXSETGLOBALROUTINGINFO PFAXSETGLOBALROUTINGINFOA
  1526. #endif // !UNICODE
  1527. WINFAXAPI
  1528. BOOL
  1529. WINAPI
  1530. FaxGetRoutingInfoA(
  1531. IN HANDLE FaxPortHandle,
  1532. IN LPCSTR RoutingGuid,
  1533. OUT LPBYTE *RoutingInfoBuffer,
  1534. OUT LPDWORD RoutingInfoBufferSize
  1535. );
  1536. WINFAXAPI
  1537. BOOL
  1538. WINAPI
  1539. FaxGetRoutingInfoW(
  1540. IN HANDLE FaxPortHandle,
  1541. IN LPCWSTR RoutingGuid,
  1542. OUT LPBYTE *RoutingInfoBuffer,
  1543. OUT LPDWORD RoutingInfoBufferSize
  1544. );
  1545. #ifdef UNICODE
  1546. #define FaxGetRoutingInfo FaxGetRoutingInfoW
  1547. #else
  1548. #define FaxGetRoutingInfo FaxGetRoutingInfoA
  1549. #endif // !UNICODE
  1550. typedef BOOL
  1551. (WINAPI *PFAXGETROUTINGINFOA)(
  1552. IN HANDLE FaxPortHandle,
  1553. IN LPCSTR RoutingGuid,
  1554. OUT LPBYTE *RoutingInfoBuffer,
  1555. OUT LPDWORD RoutingInfoBufferSize
  1556. );
  1557. typedef BOOL
  1558. (WINAPI *PFAXGETROUTINGINFOW)(
  1559. IN HANDLE FaxPortHandle,
  1560. IN LPCWSTR RoutingGuid,
  1561. OUT LPBYTE *RoutingInfoBuffer,
  1562. OUT LPDWORD RoutingInfoBufferSize
  1563. );
  1564. #ifdef UNICODE
  1565. #define PFAXGETROUTINGINFO PFAXGETROUTINGINFOW
  1566. #else
  1567. #define PFAXGETROUTINGINFO PFAXGETROUTINGINFOA
  1568. #endif // !UNICODE
  1569. WINFAXAPI
  1570. BOOL
  1571. WINAPI
  1572. FaxSetRoutingInfoA(
  1573. IN HANDLE FaxPortHandle,
  1574. IN LPCSTR RoutingGuid,
  1575. IN const BYTE *RoutingInfoBuffer,
  1576. IN DWORD RoutingInfoBufferSize
  1577. );
  1578. WINFAXAPI
  1579. BOOL
  1580. WINAPI
  1581. FaxSetRoutingInfoW(
  1582. IN HANDLE FaxPortHandle,
  1583. IN LPCWSTR RoutingGuid,
  1584. IN const BYTE *RoutingInfoBuffer,
  1585. IN DWORD RoutingInfoBufferSize
  1586. );
  1587. #ifdef UNICODE
  1588. #define FaxSetRoutingInfo FaxSetRoutingInfoW
  1589. #else
  1590. #define FaxSetRoutingInfo FaxSetRoutingInfoA
  1591. #endif // !UNICODE
  1592. typedef BOOL
  1593. (WINAPI *PFAXSETROUTINGINFOA)(
  1594. IN HANDLE FaxPortHandle,
  1595. IN LPCSTR RoutingGuid,
  1596. IN const BYTE *RoutingInfoBuffer,
  1597. IN DWORD RoutingInfoBufferSize
  1598. );
  1599. typedef BOOL
  1600. (WINAPI *PFAXSETROUTINGINFOW)(
  1601. IN HANDLE FaxPortHandle,
  1602. IN LPCWSTR RoutingGuid,
  1603. IN const BYTE *RoutingInfoBuffer,
  1604. IN DWORD RoutingInfoBufferSize
  1605. );
  1606. #ifdef UNICODE
  1607. #define PFAXSETROUTINGINFO PFAXSETROUTINGINFOW
  1608. #else
  1609. #define PFAXSETROUTINGINFO PFAXSETROUTINGINFOA
  1610. #endif // !UNICODE
  1611. WINFAXAPI
  1612. BOOL
  1613. WINAPI
  1614. FaxInitializeEventQueue(
  1615. IN HANDLE FaxHandle,
  1616. IN HANDLE CompletionPort,
  1617. IN ULONG_PTR CompletionKey,
  1618. IN HWND hWnd,
  1619. IN UINT MessageStart
  1620. );
  1621. typedef BOOL
  1622. (WINAPI *PFAXINITIALIZEEVENTQUEUE)(
  1623. IN HANDLE FaxHandle,
  1624. IN HANDLE CompletionPort,
  1625. IN ULONG_PTR CompletionKey,
  1626. IN HWND hWnd,
  1627. IN UINT MessageStart
  1628. );
  1629. WINFAXAPI
  1630. VOID
  1631. WINAPI
  1632. FaxFreeBuffer(
  1633. LPVOID Buffer
  1634. );
  1635. typedef VOID
  1636. (WINAPI *PFAXFREEBUFFER)(
  1637. LPVOID Buffer
  1638. );
  1639. WINFAXAPI
  1640. BOOL
  1641. WINAPI
  1642. FaxStartPrintJobA(
  1643. IN LPCSTR PrinterName,
  1644. IN const FAX_PRINT_INFOA *PrintInfo,
  1645. OUT LPDWORD FaxJobId,
  1646. OUT PFAX_CONTEXT_INFOA FaxContextInfo
  1647. );
  1648. WINFAXAPI
  1649. BOOL
  1650. WINAPI
  1651. FaxStartPrintJobW(
  1652. IN LPCWSTR PrinterName,
  1653. IN const FAX_PRINT_INFOW *PrintInfo,
  1654. OUT LPDWORD FaxJobId,
  1655. OUT PFAX_CONTEXT_INFOW FaxContextInfo
  1656. );
  1657. #ifdef UNICODE
  1658. #define FaxStartPrintJob FaxStartPrintJobW
  1659. #else
  1660. #define FaxStartPrintJob FaxStartPrintJobA
  1661. #endif // !UNICODE
  1662. typedef BOOL
  1663. (WINAPI *PFAXSTARTPRINTJOBA)(
  1664. IN LPCSTR PrinterName,
  1665. IN const FAX_PRINT_INFOA *PrintInfo,
  1666. OUT LPDWORD FaxJobId,
  1667. OUT PFAX_CONTEXT_INFOA FaxContextInfo
  1668. );
  1669. typedef BOOL
  1670. (WINAPI *PFAXSTARTPRINTJOBW)(
  1671. IN LPCWSTR PrinterName,
  1672. IN const FAX_PRINT_INFOW *PrintInfo,
  1673. OUT LPDWORD FaxJobId,
  1674. OUT PFAX_CONTEXT_INFOW FaxContextInfo
  1675. );
  1676. #ifdef UNICODE
  1677. #define PFAXSTARTPRINTJOB PFAXSTARTPRINTJOBW
  1678. #else
  1679. #define PFAXSTARTPRINTJOB PFAXSTARTPRINTJOBA
  1680. #endif // !UNICODE
  1681. WINFAXAPI
  1682. BOOL
  1683. WINAPI
  1684. FaxPrintCoverPageA(
  1685. IN const FAX_CONTEXT_INFOA *FaxContextInfo,
  1686. IN const FAX_COVERPAGE_INFOA *CoverPageInfo
  1687. );
  1688. WINFAXAPI
  1689. BOOL
  1690. WINAPI
  1691. FaxPrintCoverPageW(
  1692. IN const FAX_CONTEXT_INFOW *FaxContextInfo,
  1693. IN const FAX_COVERPAGE_INFOW *CoverPageInfo
  1694. );
  1695. #ifdef UNICODE
  1696. #define FaxPrintCoverPage FaxPrintCoverPageW
  1697. #else
  1698. #define FaxPrintCoverPage FaxPrintCoverPageA
  1699. #endif // !UNICODE
  1700. typedef BOOL
  1701. (WINAPI *PFAXPRINTCOVERPAGEA)(
  1702. IN const FAX_CONTEXT_INFOA *FaxContextInfo,
  1703. IN const FAX_COVERPAGE_INFOA *CoverPageInfo
  1704. );
  1705. typedef BOOL
  1706. (WINAPI *PFAXPRINTCOVERPAGEW)(
  1707. IN const FAX_CONTEXT_INFOW *FaxContextInfo,
  1708. IN const FAX_COVERPAGE_INFOW *CoverPageInfo
  1709. );
  1710. #ifdef UNICODE
  1711. #define PFAXPRINTCOVERPAGE PFAXPRINTCOVERPAGEW
  1712. #else
  1713. #define PFAXPRINTCOVERPAGE PFAXPRINTCOVERPAGEA
  1714. #endif // !UNICODE
  1715. WINFAXAPI
  1716. BOOL
  1717. WINAPI
  1718. FaxRegisterServiceProviderW(
  1719. IN LPCWSTR DeviceProvider,
  1720. IN LPCWSTR FriendlyName,
  1721. IN LPCWSTR ImageName,
  1722. IN LPCWSTR TspName
  1723. );
  1724. #define FaxRegisterServiceProvider FaxRegisterServiceProviderW
  1725. typedef BOOL
  1726. (WINAPI *PFAXREGISTERSERVICEPROVIDERW)(
  1727. IN LPCWSTR DeviceProvider,
  1728. IN LPCWSTR FriendlyName,
  1729. IN LPCWSTR ImageName,
  1730. IN LPCWSTR TspName
  1731. );
  1732. #define PFAXREGISTERSERVICEPROVIDER PFAXREGISTERSERVICEPROVIDERW
  1733. typedef BOOL
  1734. (CALLBACK *PFAX_ROUTING_INSTALLATION_CALLBACKW)(
  1735. IN HANDLE FaxHandle,
  1736. IN LPVOID Context,
  1737. IN OUT LPWSTR MethodName,
  1738. IN OUT LPWSTR FriendlyName,
  1739. IN OUT LPWSTR FunctionName,
  1740. IN OUT LPWSTR Guid
  1741. );
  1742. #define PFAX_ROUTING_INSTALLATION_CALLBACK PFAX_ROUTING_INSTALLATION_CALLBACKW
  1743. WINFAXAPI
  1744. BOOL
  1745. WINAPI
  1746. FaxRegisterRoutingExtensionW(
  1747. IN HANDLE FaxHandle,
  1748. IN LPCWSTR ExtensionName,
  1749. IN LPCWSTR FriendlyName,
  1750. IN LPCWSTR ImageName,
  1751. IN PFAX_ROUTING_INSTALLATION_CALLBACKW CallBack,
  1752. IN LPVOID Context
  1753. );
  1754. #define FaxRegisterRoutingExtension FaxRegisterRoutingExtensionW
  1755. typedef BOOL
  1756. (WINAPI *PFAXREGISTERROUTINGEXTENSIONW)(
  1757. IN HANDLE FaxHandle,
  1758. IN LPCWSTR ExtensionName,
  1759. IN LPCWSTR FriendlyName,
  1760. IN LPCWSTR ImageName,
  1761. IN PFAX_ROUTING_INSTALLATION_CALLBACKW CallBack,
  1762. IN LPVOID Context
  1763. );
  1764. #define PFAXREGISTERROUTINGEXTENSION PFAXREGISTERROUTINGEXTENSIONW
  1765. WINFAXAPI
  1766. BOOL
  1767. WINAPI
  1768. FaxUnregisterRoutingExtensionA(
  1769. IN HANDLE hFaxHandle,
  1770. IN LPCSTR lpctstrExtensionName
  1771. );
  1772. WINFAXAPI
  1773. BOOL
  1774. WINAPI
  1775. FaxUnregisterRoutingExtensionW(
  1776. IN HANDLE hFaxHandle,
  1777. IN LPCWSTR lpctstrExtensionName
  1778. );
  1779. #ifdef UNICODE
  1780. #define FaxUnregisterRoutingExtension FaxUnregisterRoutingExtensionW
  1781. #else
  1782. #define FaxUnregisterRoutingExtension FaxUnregisterRoutingExtensionA
  1783. #endif // !UNICODE
  1784. WINFAXAPI
  1785. BOOL
  1786. WINAPI
  1787. FaxAccessCheck(
  1788. IN HANDLE FaxHandle,
  1789. IN DWORD AccessMask
  1790. );
  1791. typedef BOOL
  1792. (WINAPI *PFAXACCESSCHECK)(
  1793. IN HANDLE FaxHandle,
  1794. IN DWORD AccessMask
  1795. );
  1796. //
  1797. // Fax Specific Access Rights
  1798. //
  1799. #define FAX_JOB_SUBMIT (0x0001)
  1800. #define FAX_JOB_QUERY (0x0002)
  1801. #define FAX_CONFIG_QUERY (0x0004)
  1802. #define FAX_CONFIG_SET (0x0008)
  1803. #define FAX_PORT_QUERY (0x0010)
  1804. #define FAX_PORT_SET (0x0020)
  1805. #define FAX_JOB_MANAGE (0x0040)
  1806. #define FAX_READ (STANDARD_RIGHTS_READ |\
  1807. FAX_JOB_QUERY |\
  1808. FAX_CONFIG_QUERY |\
  1809. FAX_PORT_QUERY)
  1810. #define FAX_WRITE (STANDARD_RIGHTS_WRITE |\
  1811. FAX_JOB_SUBMIT )
  1812. #define FAX_ALL_ACCESS (STANDARD_RIGHTS_ALL |\
  1813. FAX_JOB_SUBMIT |\
  1814. FAX_JOB_QUERY |\
  1815. FAX_CONFIG_QUERY |\
  1816. FAX_CONFIG_SET |\
  1817. FAX_PORT_QUERY |\
  1818. FAX_PORT_SET |\
  1819. FAX_JOB_MANAGE)
  1820. #ifdef __cplusplus
  1821. }
  1822. #endif
  1823. #endif