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.

1836 lines
56 KiB

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