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.

2027 lines
63 KiB

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