jwawinfax.pas 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608
  1. {******************************************************************************}
  2. { }
  3. { Windows FAX API interface unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: winfax.h, released November 2001. The original Pascal }
  9. { code is: WinFax.pas, released April 2002. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. unit JwaWinFax;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "winfax.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. JwaWinType, JwaWinError, JwaWinBase, JwaWinNT;
  51. //
  52. // FAX ERROR CODES
  53. //
  54. const
  55. FAX_ERR_START = 7001; // First fax specific error code
  56. {$EXTERNALSYM FAX_ERR_START}
  57. FAX_ERR_SRV_OUTOFMEMORY = 7001;
  58. {$EXTERNALSYM FAX_ERR_SRV_OUTOFMEMORY}
  59. FAX_ERR_GROUP_NOT_FOUND = 7002;
  60. {$EXTERNALSYM FAX_ERR_GROUP_NOT_FOUND}
  61. FAX_ERR_BAD_GROUP_CONFIGURATION = 7003;
  62. {$EXTERNALSYM FAX_ERR_BAD_GROUP_CONFIGURATION}
  63. FAX_ERR_GROUP_IN_USE = 7004;
  64. {$EXTERNALSYM FAX_ERR_GROUP_IN_USE}
  65. FAX_ERR_RULE_NOT_FOUND = 7005;
  66. {$EXTERNALSYM FAX_ERR_RULE_NOT_FOUND}
  67. FAX_ERR_NOT_NTFS = 7006;
  68. {$EXTERNALSYM FAX_ERR_NOT_NTFS}
  69. FAX_ERR_DIRECTORY_IN_USE = 7007;
  70. {$EXTERNALSYM FAX_ERR_DIRECTORY_IN_USE}
  71. FAX_ERR_FILE_ACCESS_DENIED = 7008;
  72. {$EXTERNALSYM FAX_ERR_FILE_ACCESS_DENIED}
  73. FAX_ERR_MESSAGE_NOT_FOUND = 7009;
  74. {$EXTERNALSYM FAX_ERR_MESSAGE_NOT_FOUND}
  75. FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED = 7010;
  76. {$EXTERNALSYM FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED}
  77. FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU = 7011;
  78. {$EXTERNALSYM FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU}
  79. FAX_ERR_VERSION_MISMATCH = 7012; // Fax client/server versions mismtach
  80. {$EXTERNALSYM FAX_ERR_VERSION_MISMATCH}
  81. FAX_ERR_RECIPIENTS_LIMIT = 7013; // Recipients limit in a single broadcast
  82. {$EXTERNALSYM FAX_ERR_RECIPIENTS_LIMIT}
  83. FAX_ERR_END = 7013; // Last fax specific error code
  84. {$EXTERNALSYM FAX_ERR_END}
  85. //
  86. // MessageId: FAX_E_SRV_OUTOFMEMORY
  87. //
  88. // MessageText:
  89. //
  90. // The fax server failed to allocate memory.
  91. //
  92. FAX_E_SRV_OUTOFMEMORY = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_SRV_OUTOFMEMORY);
  93. {$EXTERNALSYM FAX_E_SRV_OUTOFMEMORY}
  94. //
  95. // MessageId: FAX_E_GROUP_NOT_FOUND
  96. //
  97. // MessageText:
  98. //
  99. // The fax server failed to locate an outbound routing group by name.
  100. //
  101. FAX_E_GROUP_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_NOT_FOUND);
  102. {$EXTERNALSYM FAX_E_GROUP_NOT_FOUND}
  103. //
  104. // MessageId: FAX_E_BAD_GROUP_CONFIGURATION
  105. //
  106. // MessageText:
  107. //
  108. // The fax server encountered an outbound routing group with bad configuration.
  109. //
  110. FAX_E_BAD_GROUP_CONFIGURATION = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_BAD_GROUP_CONFIGURATION);
  111. {$EXTERNALSYM FAX_E_BAD_GROUP_CONFIGURATION}
  112. //
  113. // MessageId: FAX_E_GROUP_IN_USE
  114. //
  115. // MessageText:
  116. //
  117. // The fax server cannot remove an outbound routing group because it is in use by one or more outbound routing rules.
  118. //
  119. FAX_E_GROUP_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_IN_USE);
  120. {$EXTERNALSYM FAX_E_GROUP_IN_USE}
  121. //
  122. // MessageId: FAX_E_RULE_NOT_FOUND
  123. //
  124. // MessageText:
  125. //
  126. // The fax server failed to locate an outbound routing rule by country code and area code.
  127. //
  128. FAX_E_RULE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RULE_NOT_FOUND);
  129. {$EXTERNALSYM FAX_E_RULE_NOT_FOUND}
  130. //
  131. // MessageId: FAX_E_NOT_NTFS
  132. //
  133. // MessageText:
  134. //
  135. // The fax server cannot set an archive folder to a non-NTFS partition.
  136. //
  137. FAX_E_NOT_NTFS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_NTFS);
  138. {$EXTERNALSYM FAX_E_NOT_NTFS}
  139. //
  140. // MessageId: FAX_E_DIRECTORY_IN_USE
  141. //
  142. // MessageText:
  143. //
  144. // The fax server cannot use the same folder for both the inbox and the sent-items archives.
  145. //
  146. FAX_E_DIRECTORY_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DIRECTORY_IN_USE);
  147. {$EXTERNALSYM FAX_E_DIRECTORY_IN_USE}
  148. //
  149. // MessageId: FAX_E_FILE_ACCESS_DENIED
  150. //
  151. // MessageText:
  152. //
  153. // The fax server cannot access the specified file or folder.
  154. //
  155. FAX_E_FILE_ACCESS_DENIED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_FILE_ACCESS_DENIED);
  156. {$EXTERNALSYM FAX_E_FILE_ACCESS_DENIED}
  157. //
  158. // MessageId: FAX_E_MESSAGE_NOT_FOUND
  159. //
  160. // MessageText:
  161. //
  162. // The fax server cannot find the job or message by its ID.
  163. //
  164. FAX_E_MESSAGE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_MESSAGE_NOT_FOUND);
  165. {$EXTERNALSYM FAX_E_MESSAGE_NOT_FOUND}
  166. //
  167. // MessageId: FAX_E_DEVICE_NUM_LIMIT_EXCEEDED
  168. //
  169. // MessageText:
  170. //
  171. // The fax server cannot complete the operation because the number of active fax devices allowed for this version of Windows was exceeded.
  172. //
  173. FAX_E_DEVICE_NUM_LIMIT_EXCEEDED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED);
  174. {$EXTERNALSYM FAX_E_DEVICE_NUM_LIMIT_EXCEEDED}
  175. //
  176. // MessageId: FAX_E_NOT_SUPPORTED_ON_THIS_SKU
  177. //
  178. // MessageText:
  179. //
  180. // The fax server cannot complete the operation because it is not supported for this version of Windows.
  181. //
  182. FAX_E_NOT_SUPPORTED_ON_THIS_SKU = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU);
  183. {$EXTERNALSYM FAX_E_NOT_SUPPORTED_ON_THIS_SKU}
  184. //
  185. // MessageId: FAX_E_VERSION_MISMATCH
  186. //
  187. // MessageText:
  188. //
  189. // The fax server API version does not support the requested operation.
  190. //
  191. FAX_E_VERSION_MISMATCH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_VERSION_MISMATCH);
  192. {$EXTERNALSYM FAX_E_VERSION_MISMATCH}
  193. //
  194. // MessageId: FAX_E_RECIPIENT_LIMIT
  195. //
  196. // MessageText:
  197. //
  198. // The limit on the number of recipients for a single fax broadcast was reached.
  199. //
  200. FAX_E_RECIPIENTS_LIMIT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RECIPIENTS_LIMIT);
  201. {$EXTERNALSYM FAX_E_RECIPIENTS_LIMIT}
  202. type
  203. FAX_ENUM_LOG_LEVELS = (
  204. FAXLOG_LEVEL_NONE,
  205. FAXLOG_LEVEL_MIN,
  206. FAXLOG_LEVEL_MED,
  207. FAXLOG_LEVEL_MAX);
  208. {$EXTERNALSYM FAX_ENUM_LOG_LEVELS}
  209. TFaxEnumLogLevels = FAX_ENUM_LOG_LEVELS;
  210. FAX_ENUM_LOG_CATEGORIES = (
  211. FAXLOG_CATEGORY_FILLER0,
  212. FAXLOG_CATEGORY_INIT, // Initialization / shutdown
  213. FAXLOG_CATEGORY_OUTBOUND, // Outbound messages
  214. FAXLOG_CATEGORY_INBOUND, // Inbound messages
  215. FAXLOG_CATEGORY_UNKNOWN); // Unknown category (all others)
  216. {$EXTERNALSYM FAX_ENUM_LOG_CATEGORIES}
  217. TFaxEnumLogCategories = FAX_ENUM_LOG_CATEGORIES;
  218. PFAX_LOG_CATEGORYA = ^FAX_LOG_CATEGORYA;
  219. {$EXTERNALSYM PFAX_LOG_CATEGORYA}
  220. _FAX_LOG_CATEGORYA = record
  221. Name: LPCSTR; // logging category name
  222. Category: DWORD; // logging category number
  223. Level: DWORD; // logging level for the category
  224. end;
  225. {$EXTERNALSYM _FAX_LOG_CATEGORYA}
  226. FAX_LOG_CATEGORYA = _FAX_LOG_CATEGORYA;
  227. {$EXTERNALSYM FAX_LOG_CATEGORYA}
  228. TFaxLogCategoryA = FAX_LOG_CATEGORYA;
  229. PFaxLogCategoryA = PFAX_LOG_CATEGORYA;
  230. PFAX_LOG_CATEGORYW = ^FAX_LOG_CATEGORYW;
  231. {$EXTERNALSYM PFAX_LOG_CATEGORYW}
  232. _FAX_LOG_CATEGORYW = record
  233. Name: LPCWSTR; // logging category name
  234. Category: DWORD; // logging category number
  235. Level: DWORD; // logging level for the category
  236. end;
  237. {$EXTERNALSYM _FAX_LOG_CATEGORYW}
  238. FAX_LOG_CATEGORYW = _FAX_LOG_CATEGORYW;
  239. {$EXTERNALSYM FAX_LOG_CATEGORYW}
  240. TFaxLogCategoryW = FAX_LOG_CATEGORYW;
  241. PFaxLogCategoryW = PFAX_LOG_CATEGORYW;
  242. {$IFDEF UNICODE}
  243. FAX_LOG_CATEGORY = FAX_LOG_CATEGORYW;
  244. {$EXTERNALSYM FAX_LOG_CATEGORY}
  245. PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYW;
  246. {$EXTERNALSYM PFAX_LOG_CATEGORY}
  247. TFaxLogCategory = TFaxLogCategoryW;
  248. PFaxLogCategory = PFaxLogCategoryW;
  249. {$ELSE}
  250. FAX_LOG_CATEGORY = FAX_LOG_CATEGORYA;
  251. {$EXTERNALSYM FAX_LOG_CATEGORY}
  252. PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYA;
  253. {$EXTERNALSYM PFAX_LOG_CATEGORY}
  254. TFaxLogCategory = TFaxLogCategoryA;
  255. PFaxLogCategory = PFaxLogCategoryA;
  256. {$ENDIF UNICODE}
  257. PFAX_TIME = ^FAX_TIME;
  258. {$EXTERNALSYM PFAX_TIME}
  259. _FAX_TIME = record
  260. Hour: WORD;
  261. Minute: WORD;
  262. end;
  263. {$EXTERNALSYM _FAX_TIME}
  264. FAX_TIME = _FAX_TIME;
  265. {$EXTERNALSYM FAX_TIME}
  266. TFaxTime = FAX_TIME;
  267. PFaxTime = PFAX_TIME;
  268. PFAX_CONFIGURATIONA = ^FAX_CONFIGURATIONA;
  269. {$EXTERNALSYM PFAX_CONFIGURATIONA}
  270. _FAX_CONFIGURATIONA = record
  271. SizeOfStruct: DWORD; // size of this structure
  272. Retries: DWORD; // number of retries for fax send
  273. RetryDelay: DWORD; // number of minutes between retries
  274. DirtyDays: DWORD; // number of days to keep an unsent job in the queue
  275. Branding: BOOL; // fsp should brand outgoing faxes
  276. UseDeviceTsid: BOOL; // server uses device tsid only
  277. ServerCp: BOOL; // clients must use cover pages on the server
  278. PauseServerQueue: BOOL; // is the server queue paused?
  279. StartCheapTime: FAX_TIME; // start of discount rate period
  280. StopCheapTime: FAX_TIME; // end of discount rate period
  281. ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
  282. ArchiveDirectory: LPCSTR; // archive directory for outgoing faxes
  283. Reserved: LPCSTR; // Reserved; must be NULL
  284. end;
  285. {$EXTERNALSYM _FAX_CONFIGURATIONA}
  286. FAX_CONFIGURATIONA = _FAX_CONFIGURATIONA;
  287. {$EXTERNALSYM FAX_CONFIGURATIONA}
  288. TFaxConfigurationA = FAX_CONFIGURATIONA;
  289. PFaxConfigurationA = PFAX_CONFIGURATIONA;
  290. PFAX_CONFIGURATIONW = ^FAX_CONFIGURATIONW;
  291. {$EXTERNALSYM PFAX_CONFIGURATIONW}
  292. _FAX_CONFIGURATIONW = record
  293. SizeOfStruct: DWORD; // size of this structure
  294. Retries: DWORD; // number of retries for fax send
  295. RetryDelay: DWORD; // number of minutes between retries
  296. DirtyDays: DWORD; // number of days to keep an unsent job in the queue
  297. Branding: BOOL; // fsp should brand outgoing faxes
  298. UseDeviceTsid: BOOL; // server uses device tsid only
  299. ServerCp: BOOL; // clients must use cover pages on the server
  300. PauseServerQueue: BOOL; // is the server queue paused?
  301. StartCheapTime: FAX_TIME; // start of discount rate period
  302. StopCheapTime: FAX_TIME; // end of discount rate period
  303. ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
  304. ArchiveDirectory: LPCWSTR; // archive directory for outgoing faxes
  305. Reserved: LPCWSTR; // Reserved; must be NULL
  306. end;
  307. {$EXTERNALSYM _FAX_CONFIGURATIONW}
  308. FAX_CONFIGURATIONW = _FAX_CONFIGURATIONW;
  309. {$EXTERNALSYM FAX_CONFIGURATIONW}
  310. TFaxConfigurationW = FAX_CONFIGURATIONW;
  311. PFaxConfigurationW = PFAX_CONFIGURATIONW;
  312. {$IFDEF UNICODE}
  313. FAX_CONFIGURATION = FAX_CONFIGURATIONW;
  314. {$EXTERNALSYM FAX_CONFIGURATION}
  315. PFAX_CONFIGURATION = PFAX_CONFIGURATIONW;
  316. {$EXTERNALSYM PFAX_CONFIGURATION}
  317. TFaxConfiguration = TFaxConfigurationW;
  318. PFaxConfiguration = PFaxConfigurationW;
  319. {$ELSE}
  320. FAX_CONFIGURATION = FAX_CONFIGURATIONA;
  321. {$EXTERNALSYM FAX_CONFIGURATION}
  322. PFAX_CONFIGURATION = PFAX_CONFIGURATIONA;
  323. {$EXTERNALSYM PFAX_CONFIGURATION}
  324. TFaxConfiguration = TFaxConfigurationA;
  325. PFaxConfiguration = PFaxConfigurationA;
  326. {$ENDIF UNICODE}
  327. //
  328. // FaxSetJob() command codes
  329. //
  330. FAX_ENUM_JOB_COMMANDS = (
  331. JC_UNKNOWN,
  332. JC_DELETE,
  333. JC_PAUSE,
  334. JC_RESUME);
  335. {$EXTERNALSYM FAX_ENUM_JOB_COMMANDS}
  336. TFaxEnumJobCommands = FAX_ENUM_JOB_COMMANDS;
  337. const
  338. JC_RESTART = JC_RESUME;
  339. {$EXTERNALSYM JC_RESTART}
  340. //
  341. // job type defines
  342. //
  343. JT_UNKNOWN = 0;
  344. {$EXTERNALSYM JT_UNKNOWN}
  345. JT_SEND = 1;
  346. {$EXTERNALSYM JT_SEND}
  347. JT_RECEIVE = 2;
  348. {$EXTERNALSYM JT_RECEIVE}
  349. JT_ROUTING = 3;
  350. {$EXTERNALSYM JT_ROUTING}
  351. JT_FAIL_RECEIVE = 4;
  352. {$EXTERNALSYM JT_FAIL_RECEIVE}
  353. //
  354. // job status defines
  355. //
  356. JS_PENDING = $00000000;
  357. {$EXTERNALSYM JS_PENDING}
  358. JS_INPROGRESS = $00000001;
  359. {$EXTERNALSYM JS_INPROGRESS}
  360. JS_DELETING = $00000002;
  361. {$EXTERNALSYM JS_DELETING}
  362. JS_FAILED = $00000004;
  363. {$EXTERNALSYM JS_FAILED}
  364. JS_PAUSED = $00000008;
  365. {$EXTERNALSYM JS_PAUSED}
  366. JS_NOLINE = $00000010;
  367. {$EXTERNALSYM JS_NOLINE}
  368. JS_RETRYING = $00000020;
  369. {$EXTERNALSYM JS_RETRYING}
  370. JS_RETRIES_EXCEEDED = $00000040;
  371. {$EXTERNALSYM JS_RETRIES_EXCEEDED}
  372. type
  373. PFAX_DEVICE_STATUSA = ^FAX_DEVICE_STATUSA;
  374. {$EXTERNALSYM PFAX_DEVICE_STATUSA}
  375. _FAX_DEVICE_STATUSA = record
  376. SizeOfStruct: DWORD; // size of this structure
  377. CallerId: LPCSTR; // caller id string
  378. Csid: LPCSTR; // station identifier
  379. CurrentPage: DWORD; // current page
  380. DeviceId: DWORD; // permanent line id
  381. DeviceName: LPCSTR; // device name
  382. DocumentName: LPCSTR; // document name
  383. JobType: DWORD; // send or receive?
  384. PhoneNumber: LPCSTR; // sending phone number
  385. RoutingString: LPCSTR; // routing information
  386. SenderName: LPCSTR; // sender name
  387. RecipientName: LPCSTR; // recipient name
  388. Size: DWORD; // size in bytes of the document
  389. StartTime: FILETIME; // starting time of the fax send/receive
  390. Status: DWORD; // current status of the device, see FPS_??? masks
  391. StatusString: LPCSTR; // status string if the Status field is zero. this may be NULL.
  392. SubmittedTime: FILETIME; // time the document was submitted
  393. TotalPages: DWORD; // total number of pages in this job
  394. Tsid: LPCSTR; // transmitting station identifier
  395. UserName: LPCSTR; // user that submitted the active job
  396. end;
  397. {$EXTERNALSYM _FAX_DEVICE_STATUSA}
  398. FAX_DEVICE_STATUSA = _FAX_DEVICE_STATUSA;
  399. {$EXTERNALSYM FAX_DEVICE_STATUSA}
  400. TFaxDeviceStatusA = FAX_DEVICE_STATUSA;
  401. PFaxDeviceStatusA = PFAX_DEVICE_STATUSA;
  402. PFAX_DEVICE_STATUSW = ^FAX_DEVICE_STATUSW;
  403. {$EXTERNALSYM PFAX_DEVICE_STATUSW}
  404. _FAX_DEVICE_STATUSW = record
  405. SizeOfStruct: DWORD; // size of this structure
  406. CallerId: LPCWSTR; // caller id string
  407. Csid: LPCWSTR; // station identifier
  408. CurrentPage: DWORD; // current page
  409. DeviceId: DWORD; // permanent line id
  410. DeviceName: LPCWSTR; // device name
  411. DocumentName: LPCWSTR; // document name
  412. JobType: DWORD; // send or receive?
  413. PhoneNumber: LPCWSTR; // sending phone number
  414. RoutingString: LPCWSTR; // routing information
  415. SenderName: LPCWSTR; // sender name
  416. RecipientName: LPCWSTR; // recipient name
  417. Size: DWORD; // size in bytes of the document
  418. StartTime: FILETIME; // starting time of the fax send/receive
  419. Status: DWORD; // current status of the device, see FPS_??? masks
  420. StatusString: LPCWSTR; // status string if the Status field is zero. this may be NULL.
  421. SubmittedTime: FILETIME; // time the document was submitted
  422. TotalPages: DWORD; // total number of pages in this job
  423. Tsid: LPCWSTR; // transmitting station identifier
  424. UserName: LPCWSTR; // user that submitted the active job
  425. end;
  426. {$EXTERNALSYM _FAX_DEVICE_STATUSW}
  427. FAX_DEVICE_STATUSW = _FAX_DEVICE_STATUSW;
  428. {$EXTERNALSYM FAX_DEVICE_STATUSW}
  429. TFaxDeviceStatusW = FAX_DEVICE_STATUSW;
  430. PFaxDeviceStatusW = PFAX_DEVICE_STATUSW;
  431. {$IFDEF UNICODE}
  432. FAX_DEVICE_STATUS = FAX_DEVICE_STATUSW;
  433. {$EXTERNALSYM FAX_DEVICE_STATUS}
  434. PFAX_DEVICE_STATUS = PFAX_DEVICE_STATUSW;
  435. {$EXTERNALSYM PFAX_DEVICE_STATUS}
  436. TFaxDeviceStatus = TFaxDeviceStatusW;
  437. PFaxDeviceStatus = PFaxDeviceStatusW;
  438. {$ELSE}
  439. FAX_DEVICE_STATUS = FAX_DEVICE_STATUSA;
  440. {$EXTERNALSYM FAX_DEVICE_STATUS}
  441. PFAX_DEVICE_STATUS = PFAX_DEVICE_STATUSA;
  442. {$EXTERNALSYM PFAX_DEVICE_STATUS}
  443. TFaxDeviceStatus = TFaxDeviceStatusA;
  444. PFaxDeviceStatus = PFaxDeviceStatusA;
  445. {$ENDIF UNICODE}
  446. PFAX_JOB_ENTRYA = ^FAX_JOB_ENTRYA;
  447. {$EXTERNALSYM PFAX_JOB_ENTRYA}
  448. _FAX_JOB_ENTRYA = record
  449. SizeOfStruct: DWORD; // size of this structure
  450. JobId: DWORD; // fax job id
  451. UserName: LPCSTR; // user who submitted the job
  452. JobType: DWORD; // job type, see JT defines
  453. QueueStatus: DWORD; // job queue status, see JS defines
  454. Status: DWORD; // current status of the device, see FPS_??? masks
  455. Size: DWORD; // size in bytes of the document
  456. PageCount: DWORD; // total page count
  457. RecipientNumber: LPCSTR; // recipient fax number
  458. RecipientName: LPCSTR; // recipient name
  459. Tsid: LPCSTR; // transmitter's id
  460. SenderName: LPCSTR; // sender name
  461. SenderCompany: LPCSTR; // sender company
  462. SenderDept: LPCSTR; // sender department
  463. BillingCode: LPCSTR; // billing code
  464. ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
  465. ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  466. DeliveryReportType: DWORD; // delivery report type, see DRT defines
  467. DeliveryReportAddress: LPCSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  468. DocumentName: LPCSTR; // document name
  469. end;
  470. {$EXTERNALSYM _FAX_JOB_ENTRYA}
  471. FAX_JOB_ENTRYA = _FAX_JOB_ENTRYA;
  472. {$EXTERNALSYM FAX_JOB_ENTRYA}
  473. TFaxJobEntryA = FAX_JOB_ENTRYA;
  474. PFaxJobEntryA = PFAX_JOB_ENTRYA;
  475. PFAX_JOB_ENTRYW = ^FAX_JOB_ENTRYW;
  476. {$EXTERNALSYM PFAX_JOB_ENTRYW}
  477. _FAX_JOB_ENTRYW = record
  478. SizeOfStruct: DWORD; // size of this structure
  479. JobId: DWORD; // fax job id
  480. UserName: LPCWSTR; // user who submitted the job
  481. JobType: DWORD; // job type, see JT defines
  482. QueueStatus: DWORD; // job queue status, see JS defines
  483. Status: DWORD; // current status of the device, see FPS_??? masks
  484. Size: DWORD; // size in bytes of the document
  485. PageCount: DWORD; // total page count
  486. RecipientNumber: LPCWSTR; // recipient fax number
  487. RecipientName: LPCWSTR; // recipient name
  488. Tsid: LPCWSTR; // transmitter's id
  489. SenderName: LPCWSTR; // sender name
  490. SenderCompany: LPCWSTR; // sender company
  491. SenderDept: LPCWSTR; // sender department
  492. BillingCode: LPCWSTR; // billing code
  493. ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
  494. ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  495. DeliveryReportType: DWORD; // delivery report type, see DRT defines
  496. DeliveryReportAddress: LPCWSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  497. DocumentName: LPCWSTR; // document name
  498. end;
  499. {$EXTERNALSYM _FAX_JOB_ENTRYW}
  500. FAX_JOB_ENTRYW = _FAX_JOB_ENTRYW;
  501. {$EXTERNALSYM FAX_JOB_ENTRYW}
  502. TFaxJobEntryW = FAX_JOB_ENTRYW;
  503. PFaxJobEntryW = PFAX_JOB_ENTRYW;
  504. {$IFDEF UNICODE}
  505. FAX_JOB_ENTRY = FAX_JOB_ENTRYW;
  506. {$EXTERNALSYM FAX_JOB_ENTRY}
  507. PFAX_JOB_ENTRY = PFAX_JOB_ENTRYW;
  508. {$EXTERNALSYM PFAX_JOB_ENTRY}
  509. TFaxJobEntry = TFaxJobEntryW;
  510. PFaxJobEntry = PFaxJobEntryW;
  511. {$ELSE}
  512. FAX_JOB_ENTRY = FAX_JOB_ENTRYA;
  513. {$EXTERNALSYM FAX_JOB_ENTRY}
  514. PFAX_JOB_ENTRY = PFAX_JOB_ENTRYA;
  515. {$EXTERNALSYM PFAX_JOB_ENTRY}
  516. TFaxJobEntry = TFaxJobEntryA;
  517. PFaxJobEntry = PFaxJobEntryA;
  518. {$ENDIF UNICODE}
  519. //
  520. // fax port state masks
  521. //
  522. // if you change these defines the be sure to
  523. // change the resources in the fax service.
  524. //
  525. const
  526. FPS_DIALING = $20000001;
  527. {$EXTERNALSYM FPS_DIALING}
  528. FPS_SENDING = $20000002;
  529. {$EXTERNALSYM FPS_SENDING}
  530. FPS_RECEIVING = $20000004;
  531. {$EXTERNALSYM FPS_RECEIVING}
  532. FPS_COMPLETED = $20000008;
  533. {$EXTERNALSYM FPS_COMPLETED}
  534. FPS_HANDLED = $20000010;
  535. {$EXTERNALSYM FPS_HANDLED}
  536. FPS_UNAVAILABLE = $20000020;
  537. {$EXTERNALSYM FPS_UNAVAILABLE}
  538. FPS_BUSY = $20000040;
  539. {$EXTERNALSYM FPS_BUSY}
  540. FPS_NO_ANSWER = $20000080;
  541. {$EXTERNALSYM FPS_NO_ANSWER}
  542. FPS_BAD_ADDRESS = $20000100;
  543. {$EXTERNALSYM FPS_BAD_ADDRESS}
  544. FPS_NO_DIAL_TONE = $20000200;
  545. {$EXTERNALSYM FPS_NO_DIAL_TONE}
  546. FPS_DISCONNECTED = $20000400;
  547. {$EXTERNALSYM FPS_DISCONNECTED}
  548. FPS_FATAL_ERROR = $20000800;
  549. {$EXTERNALSYM FPS_FATAL_ERROR}
  550. FPS_NOT_FAX_CALL = $20001000;
  551. {$EXTERNALSYM FPS_NOT_FAX_CALL}
  552. FPS_CALL_DELAYED = $20002000;
  553. {$EXTERNALSYM FPS_CALL_DELAYED}
  554. FPS_CALL_BLACKLISTED = $20004000;
  555. {$EXTERNALSYM FPS_CALL_BLACKLISTED}
  556. FPS_INITIALIZING = $20008000;
  557. {$EXTERNALSYM FPS_INITIALIZING}
  558. FPS_OFFLINE = $20010000;
  559. {$EXTERNALSYM FPS_OFFLINE}
  560. FPS_RINGING = $20020000;
  561. {$EXTERNALSYM FPS_RINGING}
  562. FPS_AVAILABLE = $20100000;
  563. {$EXTERNALSYM FPS_AVAILABLE}
  564. FPS_ABORTING = $20200000;
  565. {$EXTERNALSYM FPS_ABORTING}
  566. FPS_ROUTING = $20400000;
  567. {$EXTERNALSYM FPS_ROUTING}
  568. FPS_ANSWERED = $20800000;
  569. {$EXTERNALSYM FPS_ANSWERED}
  570. //
  571. // fax port capability mask
  572. //
  573. FPF_RECEIVE = $00000001; // Automatically receive faxes
  574. {$EXTERNALSYM FPF_RECEIVE}
  575. FPF_SEND = $00000002;
  576. {$EXTERNALSYM FPF_SEND}
  577. FPF_VIRTUAL = $00000004;
  578. {$EXTERNALSYM FPF_VIRTUAL}
  579. type
  580. PFAX_PORT_INFOA = ^FAX_PORT_INFOA;
  581. {$EXTERNALSYM PFAX_PORT_INFOA}
  582. _FAX_PORT_INFOA = record
  583. SizeOfStruct: DWORD; // size of this structure
  584. DeviceId: DWORD; // Device ID
  585. State: DWORD; // State of the device
  586. Flags: DWORD; // Device specific flags
  587. Rings: DWORD; // Number of rings before answer
  588. Priority: DWORD; // Device priority
  589. DeviceName: LPCSTR; // Device name
  590. Tsid: LPCSTR; // Device Tsid
  591. Csid: LPCSTR; // Device Csid
  592. end;
  593. {$EXTERNALSYM _FAX_PORT_INFOA}
  594. FAX_PORT_INFOA = _FAX_PORT_INFOA;
  595. {$EXTERNALSYM FAX_PORT_INFOA}
  596. TFaxPortInfoA = FAX_PORT_INFOA;
  597. PFaxPortInfoA = PFAX_PORT_INFOA;
  598. PFAX_PORT_INFOW = ^FAX_PORT_INFOW;
  599. {$EXTERNALSYM PFAX_PORT_INFOW}
  600. _FAX_PORT_INFOW = record
  601. SizeOfStruct: DWORD; // size of this structure
  602. DeviceId: DWORD; // Device ID
  603. State: DWORD; // State of the device
  604. Flags: DWORD; // Device specific flags
  605. Rings: DWORD; // Number of rings before answer
  606. Priority: DWORD; // Device priority
  607. DeviceName: LPCWSTR; // Device name
  608. Tsid: LPCWSTR; // Device Tsid
  609. Csid: LPCWSTR; // Device Csid
  610. end;
  611. {$EXTERNALSYM _FAX_PORT_INFOW}
  612. FAX_PORT_INFOW = _FAX_PORT_INFOW;
  613. {$EXTERNALSYM FAX_PORT_INFOW}
  614. TFaxPortInfoW = FAX_PORT_INFOW;
  615. PFaxPortInfoW = PFAX_PORT_INFOW;
  616. {$IFDEF UNICODE}
  617. FAX_PORT_INFO = FAX_PORT_INFOW;
  618. {$EXTERNALSYM FAX_PORT_INFO}
  619. PFAX_PORT_INFO = PFAX_PORT_INFOW;
  620. {$EXTERNALSYM PFAX_PORT_INFO}
  621. TFaxPortInfo = TFaxPortInfoW;
  622. PFaxPortInfo = PFaxPortInfoW;
  623. {$ELSE}
  624. FAX_PORT_INFO = FAX_PORT_INFOA;
  625. {$EXTERNALSYM FAX_PORT_INFO}
  626. PFAX_PORT_INFO = PFAX_PORT_INFOA;
  627. {$EXTERNALSYM PFAX_PORT_INFO}
  628. TFaxPortInfo = TFaxPortInfoA;
  629. PFaxPortInfo = PFaxPortInfoA;
  630. {$ENDIF UNICODE}
  631. PFAX_ROUTING_METHODA = ^FAX_ROUTING_METHODA;
  632. {$EXTERNALSYM PFAX_ROUTING_METHODA}
  633. _FAX_ROUTING_METHODA = record
  634. SizeOfStruct: DWORD; // size of this structure
  635. DeviceId: DWORD; // device identifier
  636. Enabled: BOOL; // is this method enabled for this device?
  637. DeviceName: LPCSTR; // device name
  638. Guid: LPCSTR; // guid that identifies this routing method
  639. FriendlyName: LPCSTR; // friendly name for this method
  640. FunctionName: LPCSTR; // exported function name that identifies this method
  641. ExtensionImageName: LPCSTR; // module (dll) name that implements this method
  642. ExtensionFriendlyName: LPCSTR; // displayable string that identifies the extension
  643. end;
  644. {$EXTERNALSYM _FAX_ROUTING_METHODA}
  645. FAX_ROUTING_METHODA = _FAX_ROUTING_METHODA;
  646. {$EXTERNALSYM FAX_ROUTING_METHODA}
  647. TFaxRoutingMethodA = FAX_ROUTING_METHODA;
  648. PFaxRoutingMethodA = PFAX_ROUTING_METHODA;
  649. PFAX_ROUTING_METHODW = ^FAX_ROUTING_METHODW;
  650. {$EXTERNALSYM PFAX_ROUTING_METHODW}
  651. _FAX_ROUTING_METHODW = record
  652. SizeOfStruct: DWORD; // size of this structure
  653. DeviceId: DWORD; // device identifier
  654. Enabled: BOOL; // is this method enabled for this device?
  655. DeviceName: LPCWSTR; // device name
  656. Guid: LPCWSTR; // guid that identifies this routing method
  657. FriendlyName: LPCWSTR; // friendly name for this method
  658. FunctionName: LPCWSTR; // exported function name that identifies this method
  659. ExtensionImageName: LPCWSTR; // module (dll) name that implements this method
  660. ExtensionFriendlyName: LPCWSTR; // displayable string that identifies the extension
  661. end;
  662. {$EXTERNALSYM _FAX_ROUTING_METHODW}
  663. FAX_ROUTING_METHODW = _FAX_ROUTING_METHODW;
  664. {$EXTERNALSYM FAX_ROUTING_METHODW}
  665. TFaxRoutingMethodW = FAX_ROUTING_METHODW;
  666. PFaxRoutingMethodW = PFAX_ROUTING_METHODW;
  667. {$IFDEF UNICODE}
  668. FAX_ROUTING_METHOD = FAX_ROUTING_METHODW;
  669. {$EXTERNALSYM FAX_ROUTING_METHOD}
  670. PFAX_ROUTING_METHOD = PFAX_ROUTING_METHODW;
  671. {$EXTERNALSYM PFAX_ROUTING_METHOD}
  672. TFaxRoutingMethod = TFaxRoutingMethodW;
  673. PFaxRoutingMethod = PFaxRoutingMethodW;
  674. {$ELSE}
  675. FAX_ROUTING_METHOD = FAX_ROUTING_METHODA;
  676. {$EXTERNALSYM FAX_ROUTING_METHOD}
  677. PFAX_ROUTING_METHOD = PFAX_ROUTING_METHODA;
  678. {$EXTERNALSYM PFAX_ROUTING_METHOD}
  679. TFaxRoutingMethod = TFaxRoutingMethodA;
  680. PFaxRoutingMethod = PFaxRoutingMethodA;
  681. {$ENDIF UNICODE}
  682. PFAX_GLOBAL_ROUTING_INFOA = ^FAX_GLOBAL_ROUTING_INFOA;
  683. {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFOA}
  684. _FAX_GLOBAL_ROUTING_INFOA = record
  685. SizeOfStruct: DWORD; // size of this structure
  686. Priority: DWORD; // priority of this device
  687. Guid: LPCSTR; // guid that identifies this routing method
  688. FriendlyName: LPCSTR; // friendly name for this method
  689. FunctionName: LPCSTR; // exported function name that identifies this method
  690. ExtensionImageName: LPCSTR; // module (dll) name that implements this method
  691. ExtensionFriendlyName: LPCSTR; // displayable string that identifies the extension
  692. end;
  693. {$EXTERNALSYM _FAX_GLOBAL_ROUTING_INFOA}
  694. FAX_GLOBAL_ROUTING_INFOA = _FAX_GLOBAL_ROUTING_INFOA;
  695. {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFOA}
  696. TFaxGlobalRoutingInfoA = FAX_GLOBAL_ROUTING_INFOA;
  697. PFaxGlobalRoutingInfoA = PFAX_GLOBAL_ROUTING_INFOA;
  698. PFAX_GLOBAL_ROUTING_INFOW = ^FAX_GLOBAL_ROUTING_INFOW;
  699. {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFOW}
  700. _FAX_GLOBAL_ROUTING_INFOW = record
  701. SizeOfStruct: DWORD; // size of this structure
  702. Priority: DWORD; // priority of this device
  703. Guid: LPCWSTR; // guid that identifies this routing method
  704. FriendlyName: LPCWSTR; // friendly name for this method
  705. FunctionName: LPCWSTR; // exported function name that identifies this method
  706. ExtensionImageName: LPCWSTR; // module (dll) name that implements this method
  707. ExtensionFriendlyName: LPCWSTR; // displayable string that identifies the extension
  708. end;
  709. {$EXTERNALSYM _FAX_GLOBAL_ROUTING_INFOW}
  710. FAX_GLOBAL_ROUTING_INFOW = _FAX_GLOBAL_ROUTING_INFOW;
  711. {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFOW}
  712. TFaxGlobalRoutingInfoW = FAX_GLOBAL_ROUTING_INFOW;
  713. PFaxGlobalRoutingInfoW = PFAX_GLOBAL_ROUTING_INFOW;
  714. {$IFDEF UNICODE}
  715. FAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOW;
  716. {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFO}
  717. PFAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOW;
  718. {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFO}
  719. TFaxGlobalRoutingInfo = TFaxGlobalRoutingInfoW;
  720. PFaxGlobalRoutingInfo = PFaxGlobalRoutingInfoW;
  721. {$ELSE}
  722. FAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOA;
  723. {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFO}
  724. PFAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOA;
  725. {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFO}
  726. TFaxGlobalRoutingInfo = TFaxGlobalRoutingInfoA;
  727. PFaxGlobalRoutingInfo = PFaxGlobalRoutingInfoA;
  728. {$ENDIF UNICODE}
  729. PFAX_COVERPAGE_INFOA = ^FAX_COVERPAGE_INFOA;
  730. {$EXTERNALSYM PFAX_COVERPAGE_INFOA}
  731. _FAX_COVERPAGE_INFOA = record
  732. SizeOfStruct: DWORD; // Size of this structure
  733. //
  734. // general
  735. //
  736. CoverPageName: LPCSTR; // coverpage document name
  737. UseServerCoverPage: BOOL; // coverpage exists on the fax server
  738. //
  739. // Recipient information
  740. //
  741. RecName: LPCSTR;
  742. RecFaxNumber: LPCSTR;
  743. RecCompany: LPCSTR;
  744. RecStreetAddress: LPCSTR;
  745. RecCity: LPCSTR;
  746. RecState: LPCSTR;
  747. RecZip: LPCSTR;
  748. RecCountry: LPCSTR;
  749. RecTitle: LPCSTR;
  750. RecDepartment: LPCSTR;
  751. RecOfficeLocation: LPCSTR;
  752. RecHomePhone: LPCSTR;
  753. RecOfficePhone: LPCSTR;
  754. //
  755. // Sender information
  756. //
  757. SdrName: LPCSTR;
  758. SdrFaxNumber: LPCSTR;
  759. SdrCompany: LPCSTR;
  760. SdrAddress: LPCSTR;
  761. SdrTitle: LPCSTR;
  762. SdrDepartment: LPCSTR;
  763. SdrOfficeLocation: LPCSTR;
  764. SdrHomePhone: LPCSTR;
  765. SdrOfficePhone: LPCSTR;
  766. //
  767. // Misc information
  768. //
  769. Note: LPCSTR;
  770. Subject: LPCSTR;
  771. TimeSent: SYSTEMTIME; // Time the fax was sent
  772. PageCount: DWORD; // Number of pages
  773. end;
  774. {$EXTERNALSYM _FAX_COVERPAGE_INFOA}
  775. FAX_COVERPAGE_INFOA = _FAX_COVERPAGE_INFOA;
  776. {$EXTERNALSYM FAX_COVERPAGE_INFOA}
  777. TFaxCoverpageInfoA = FAX_COVERPAGE_INFOA;
  778. PFaxCoverpageInfoA = PFAX_COVERPAGE_INFOA;
  779. PFAX_COVERPAGE_INFOW = ^FAX_COVERPAGE_INFOW;
  780. {$EXTERNALSYM PFAX_COVERPAGE_INFOW}
  781. _FAX_COVERPAGE_INFOW = record
  782. SizeOfStruct: DWORD; // Size of this structure
  783. //
  784. // general
  785. //
  786. CoverPageName: LPCWSTR; // coverpage document name
  787. UseServerCoverPage: BOOL; // coverpage exists on the fax server
  788. //
  789. // Recipient information
  790. //
  791. RecName: LPCWSTR;
  792. RecFaxNumber: LPCWSTR;
  793. RecCompany: LPCWSTR;
  794. RecStreetAddress: LPCWSTR;
  795. RecCity: LPCWSTR;
  796. RecState: LPCWSTR;
  797. RecZip: LPCWSTR;
  798. RecCountry: LPCWSTR;
  799. RecTitle: LPCWSTR;
  800. RecDepartment: LPCWSTR;
  801. RecOfficeLocation: LPCWSTR;
  802. RecHomePhone: LPCWSTR;
  803. RecOfficePhone: LPCWSTR;
  804. //
  805. // Sender information
  806. //
  807. SdrName: LPCWSTR;
  808. SdrFaxNumber: LPCWSTR;
  809. SdrCompany: LPCWSTR;
  810. SdrAddress: LPCWSTR;
  811. SdrTitle: LPCWSTR;
  812. SdrDepartment: LPCWSTR;
  813. SdrOfficeLocation: LPCWSTR;
  814. SdrHomePhone: LPCWSTR;
  815. SdrOfficePhone: LPCWSTR;
  816. //
  817. // Misc information
  818. //
  819. Note: LPCWSTR;
  820. Subject: LPCWSTR;
  821. TimeSent: SYSTEMTIME; // Time the fax was sent
  822. PageCount: DWORD; // Number of pages
  823. end;
  824. {$EXTERNALSYM _FAX_COVERPAGE_INFOW}
  825. FAX_COVERPAGE_INFOW = _FAX_COVERPAGE_INFOW;
  826. {$EXTERNALSYM FAX_COVERPAGE_INFOW}
  827. TFaxCoverpageInfoW = FAX_COVERPAGE_INFOW;
  828. PFaxCoverpageInfoW = PFAX_COVERPAGE_INFOW;
  829. {$IFDEF UNICODE}
  830. FAX_COVERPAGE_INFO = FAX_COVERPAGE_INFOW;
  831. {$EXTERNALSYM FAX_COVERPAGE_INFO}
  832. PFAX_COVERPAGE_INFO = PFAX_COVERPAGE_INFOW;
  833. {$EXTERNALSYM PFAX_COVERPAGE_INFO}
  834. TFaxCoverpageInfo = TFaxCoverpageInfoW;
  835. PFaxCoverpageInfo = PFaxCoverpageInfoW;
  836. {$ELSE}
  837. FAX_COVERPAGE_INFO = FAX_COVERPAGE_INFOA;
  838. {$EXTERNALSYM FAX_COVERPAGE_INFO}
  839. PFAX_COVERPAGE_INFO = PFAX_COVERPAGE_INFOA;
  840. {$EXTERNALSYM PFAX_COVERPAGE_INFO}
  841. TFaxCoverpageInfo = TFaxCoverpageInfoA;
  842. PFaxCoverpageInfo = PFaxCoverpageInfoA;
  843. {$ENDIF UNICODE}
  844. FAX_ENUM_JOB_SEND_ATTRIBUTES = (
  845. JSA_NOW, // Send now
  846. JSA_SPECIFIC_TIME, // Send at specific time
  847. JSA_DISCOUNT_PERIOD); // Send at server configured discount period
  848. {$EXTERNALSYM FAX_ENUM_JOB_SEND_ATTRIBUTES}
  849. TFaxEnumJobSendAttributes = FAX_ENUM_JOB_SEND_ATTRIBUTES;
  850. FAX_ENUM_DELIVERY_REPORT_TYPES = (
  851. DRT_NONE, // Do not send receipt
  852. DRT_EMAIL, // Send receipt by email
  853. DRT_INBOX); // send receipt to local inbox
  854. {$EXTERNALSYM FAX_ENUM_DELIVERY_REPORT_TYPES}
  855. TFaxEnumDeliveryReportTypes = FAX_ENUM_DELIVERY_REPORT_TYPES;
  856. HCALL = HANDLE; // todo from TAPI
  857. PFAX_JOB_PARAMA = ^FAX_JOB_PARAMA;
  858. {$EXTERNALSYM PFAX_JOB_PARAMA}
  859. _FAX_JOB_PARAMA = record
  860. SizeOfStruct: DWORD; // size of this structure
  861. RecipientNumber: LPCSTR; // recipient fax number
  862. RecipientName: LPCSTR; // recipient name
  863. Tsid: LPCSTR; // transmitter's id
  864. SenderName: LPCSTR; // sender name
  865. SenderCompany: LPCSTR; // sender company
  866. SenderDept: LPCSTR; // sender department
  867. BillingCode: LPCSTR; // billing code
  868. ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
  869. ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  870. DeliveryReportType: DWORD; // delivery report type, see DRT defines
  871. DeliveryReportAddress: LPCSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  872. DocumentName: LPCSTR; // document name (optional)
  873. CallHandle: HCALL; // optional call handle
  874. Reserved: array [0..3 - 1] of DWORD_PTR; // reserved for ms use only
  875. end;
  876. {$EXTERNALSYM _FAX_JOB_PARAMA}
  877. FAX_JOB_PARAMA = _FAX_JOB_PARAMA;
  878. {$EXTERNALSYM FAX_JOB_PARAMA}
  879. TFaxJobParamA = FAX_JOB_PARAMA;
  880. PFaxJobParamA = PFAX_JOB_PARAMA;
  881. PFAX_JOB_PARAMW = ^FAX_JOB_PARAMW;
  882. {$EXTERNALSYM PFAX_JOB_PARAMW}
  883. _FAX_JOB_PARAMW = record
  884. SizeOfStruct: DWORD; // size of this structure
  885. RecipientNumber: LPCWSTR; // recipient fax number
  886. RecipientName: LPCWSTR; // recipient name
  887. Tsid: LPCWSTR; // transmitter's id
  888. SenderName: LPCWSTR; // sender name
  889. SenderCompany: LPCWSTR; // sender company
  890. SenderDept: LPCWSTR; // sender department
  891. BillingCode: LPCWSTR; // billing code
  892. ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
  893. ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
  894. DeliveryReportType: DWORD; // delivery report type, see DRT defines
  895. DeliveryReportAddress: LPCWSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
  896. DocumentName: LPCWSTR; // document name (optional)
  897. CallHandle: HCALL; // optional call handle
  898. Reserved: array [0..3 - 1] of DWORD_PTR; // reserved for ms use only
  899. end;
  900. {$EXTERNALSYM _FAX_JOB_PARAMW}
  901. FAX_JOB_PARAMW = _FAX_JOB_PARAMW;
  902. {$EXTERNALSYM FAX_JOB_PARAMW}
  903. TFaxJobParamW = FAX_JOB_PARAMW;
  904. PFaxJobParamW = PFAX_JOB_PARAMW;
  905. {$IFDEF UNICODE}
  906. FAX_JOB_PARAM = FAX_JOB_PARAMW;
  907. {$EXTERNALSYM FAX_JOB_PARAM}
  908. PFAX_JOB_PARAM = PFAX_JOB_PARAMW;
  909. {$EXTERNALSYM PFAX_JOB_PARAM}
  910. TFaxJobParam = TFaxJobParamW;
  911. PFaxJobParam = PFaxJobParamW;
  912. {$ELSE}
  913. FAX_JOB_PARAM = FAX_JOB_PARAMA;
  914. {$EXTERNALSYM FAX_JOB_PARAM}
  915. PFAX_JOB_PARAM = PFAX_JOB_PARAMA;
  916. {$EXTERNALSYM PFAX_JOB_PARAM}
  917. TFaxJobParam = TFaxJobParamA;
  918. PFaxJobParam = PFaxJobParamA;
  919. {$ENDIF UNICODE}
  920. //
  921. // Event Ids
  922. //
  923. // FEI_NEVENTS is the number of events
  924. //
  925. const
  926. FEI_DIALING = $00000001;
  927. {$EXTERNALSYM FEI_DIALING}
  928. FEI_SENDING = $00000002;
  929. {$EXTERNALSYM FEI_SENDING}
  930. FEI_RECEIVING = $00000003;
  931. {$EXTERNALSYM FEI_RECEIVING}
  932. FEI_COMPLETED = $00000004;
  933. {$EXTERNALSYM FEI_COMPLETED}
  934. FEI_BUSY = $00000005;
  935. {$EXTERNALSYM FEI_BUSY}
  936. FEI_NO_ANSWER = $00000006;
  937. {$EXTERNALSYM FEI_NO_ANSWER}
  938. FEI_BAD_ADDRESS = $00000007;
  939. {$EXTERNALSYM FEI_BAD_ADDRESS}
  940. FEI_NO_DIAL_TONE = $00000008;
  941. {$EXTERNALSYM FEI_NO_DIAL_TONE}
  942. FEI_DISCONNECTED = $00000009;
  943. {$EXTERNALSYM FEI_DISCONNECTED}
  944. FEI_FATAL_ERROR = $0000000a;
  945. {$EXTERNALSYM FEI_FATAL_ERROR}
  946. FEI_NOT_FAX_CALL = $0000000b;
  947. {$EXTERNALSYM FEI_NOT_FAX_CALL}
  948. FEI_CALL_DELAYED = $0000000c;
  949. {$EXTERNALSYM FEI_CALL_DELAYED}
  950. FEI_CALL_BLACKLISTED = $0000000d;
  951. {$EXTERNALSYM FEI_CALL_BLACKLISTED}
  952. FEI_RINGING = $0000000e;
  953. {$EXTERNALSYM FEI_RINGING}
  954. FEI_ABORTING = $0000000f;
  955. {$EXTERNALSYM FEI_ABORTING}
  956. FEI_ROUTING = $00000010;
  957. {$EXTERNALSYM FEI_ROUTING}
  958. FEI_MODEM_POWERED_ON = $00000011;
  959. {$EXTERNALSYM FEI_MODEM_POWERED_ON}
  960. FEI_MODEM_POWERED_OFF = $00000012;
  961. {$EXTERNALSYM FEI_MODEM_POWERED_OFF}
  962. FEI_IDLE = $00000013;
  963. {$EXTERNALSYM FEI_IDLE}
  964. FEI_FAXSVC_ENDED = $00000014;
  965. {$EXTERNALSYM FEI_FAXSVC_ENDED}
  966. FEI_ANSWERED = $00000015;
  967. {$EXTERNALSYM FEI_ANSWERED}
  968. FEI_JOB_QUEUED = $00000016;
  969. {$EXTERNALSYM FEI_JOB_QUEUED}
  970. FEI_DELETED = $00000017;
  971. {$EXTERNALSYM FEI_DELETED}
  972. FEI_INITIALIZING = $00000018;
  973. {$EXTERNALSYM FEI_INITIALIZING}
  974. FEI_LINE_UNAVAILABLE = $00000019;
  975. {$EXTERNALSYM FEI_LINE_UNAVAILABLE}
  976. FEI_HANDLED = $0000001a;
  977. {$EXTERNALSYM FEI_HANDLED}
  978. FEI_FAXSVC_STARTED = $0000001b;
  979. {$EXTERNALSYM FEI_FAXSVC_STARTED}
  980. FEI_NEVENTS = FEI_FAXSVC_STARTED;
  981. {$EXTERNALSYM FEI_NEVENTS}
  982. type
  983. PFAX_EVENTA = ^FAX_EVENTA;
  984. {$EXTERNALSYM PFAX_EVENTA}
  985. _FAX_EVENTA = record
  986. SizeOfStruct: DWORD; // Size of this structure
  987. TimeStamp: FILETIME; // Timestamp for when the event was generated
  988. DeviceId: DWORD; // Permanent line id
  989. EventId: DWORD; // Current event id
  990. JobId: DWORD; // Fax Job Id, 0xffffffff indicates inactive job
  991. end;
  992. {$EXTERNALSYM _FAX_EVENTA}
  993. FAX_EVENTA = _FAX_EVENTA;
  994. {$EXTERNALSYM FAX_EVENTA}
  995. TFaxEventA = FAX_EVENTA;
  996. PFaxEventA = PFAX_EVENTA;
  997. PFAX_EVENTW = ^FAX_EVENTW;
  998. {$EXTERNALSYM PFAX_EVENTW}
  999. _FAX_EVENTW = record
  1000. SizeOfStruct: DWORD; // Size of this structure
  1001. TimeStamp: FILETIME; // Timestamp for when the event was generated
  1002. DeviceId: DWORD; // Permanent line id
  1003. EventId: DWORD; // Current event id
  1004. JobId: DWORD; // Fax Job Id, 0xffffffff indicates inactive job
  1005. end;
  1006. {$EXTERNALSYM _FAX_EVENTW}
  1007. FAX_EVENTW = _FAX_EVENTW;
  1008. {$EXTERNALSYM FAX_EVENTW}
  1009. TFaxEventW = FAX_EVENTW;
  1010. PFaxEventW = PFAX_EVENTW;
  1011. {$IFDEF UNICODE}
  1012. FAX_EVENT = FAX_EVENTW;
  1013. {$EXTERNALSYM FAX_EVENT}
  1014. PFAX_EVENT = PFAX_EVENTW;
  1015. {$EXTERNALSYM PFAX_EVENT}
  1016. TFaxEvent = TFaxEventW;
  1017. PFaxEvent = PFaxEventW;
  1018. {$ELSE}
  1019. FAX_EVENT = FAX_EVENTA;
  1020. {$EXTERNALSYM FAX_EVENT}
  1021. PFAX_EVENT = PFAX_EVENTA;
  1022. {$EXTERNALSYM PFAX_EVENT}
  1023. TFaxEvent = TFaxEventA;
  1024. PFaxEvent = PFaxEventA;
  1025. {$ENDIF UNICODE}
  1026. PFAX_PRINT_INFOA = ^FAX_PRINT_INFOA;
  1027. {$EXTERNALSYM PFAX_PRINT_INFOA}
  1028. _FAX_PRINT_INFOA = record
  1029. SizeOfStruct: DWORD; // Size of this structure
  1030. DocName: LPCSTR; // Document name that appears in the spooler
  1031. RecipientName: LPCSTR; // Recipient name
  1032. RecipientNumber: LPCSTR; // Recipient fax number (non-canonical number)
  1033. SenderName: LPCSTR; // Sender name
  1034. SenderCompany: LPCSTR; // Sender company (optional)
  1035. SenderDept: LPCSTR; // Sender department
  1036. SenderBillingCode: LPCSTR; // Billing code
  1037. Reserved: LPCSTR; // Reserved; must be NULL
  1038. DrEmailAddress: LPCSTR; // E.Mail address for delivery report
  1039. OutputFileName: LPCSTR; // for print to file, resulting file name
  1040. end;
  1041. {$EXTERNALSYM _FAX_PRINT_INFOA}
  1042. FAX_PRINT_INFOA = _FAX_PRINT_INFOA;
  1043. {$EXTERNALSYM FAX_PRINT_INFOA}
  1044. TFaxPrintInfoA = FAX_PRINT_INFOA;
  1045. PFaxPrintInfoA = PFAX_PRINT_INFOA;
  1046. PFAX_PRINT_INFOW = ^FAX_PRINT_INFOW;
  1047. {$EXTERNALSYM PFAX_PRINT_INFOW}
  1048. _FAX_PRINT_INFOW = record
  1049. SizeOfStruct: DWORD; // Size of this structure
  1050. DocName: LPCWSTR; // Document name that appears in the spooler
  1051. RecipientName: LPCWSTR; // Recipient name
  1052. RecipientNumber: LPCWSTR; // Recipient fax number (non-canonical number)
  1053. SenderName: LPCWSTR; // Sender name
  1054. SenderCompany: LPCWSTR; // Sender company (optional)
  1055. SenderDept: LPCWSTR; // Sender department
  1056. SenderBillingCode: LPCWSTR; // Billing code
  1057. Reserved: LPCWSTR; // Reserved; must be NULL
  1058. DrEmailAddress: LPCWSTR; // E.Mail address for delivery report
  1059. OutputFileName: LPCWSTR; // for print to file, resulting file name
  1060. end;
  1061. {$EXTERNALSYM _FAX_PRINT_INFOW}
  1062. FAX_PRINT_INFOW = _FAX_PRINT_INFOW;
  1063. {$EXTERNALSYM FAX_PRINT_INFOW}
  1064. TFaxPrintInfoW = FAX_PRINT_INFOW;
  1065. PFaxPrintInfoW = PFAX_PRINT_INFOW;
  1066. {$IFDEF UNICODE}
  1067. FAX_PRINT_INFO = FAX_PRINT_INFOW;
  1068. {$EXTERNALSYM FAX_PRINT_INFO}
  1069. PFAX_PRINT_INFO = PFAX_PRINT_INFOW;
  1070. {$EXTERNALSYM PFAX_PRINT_INFO}
  1071. TFaxPrintInfo = TFaxPrintInfoW;
  1072. PFaxPrintInfo = PFaxPrintInfoW;
  1073. {$ELSE}
  1074. FAX_PRINT_INFO = FAX_PRINT_INFOA;
  1075. {$EXTERNALSYM FAX_PRINT_INFO}
  1076. PFAX_PRINT_INFO = PFAX_PRINT_INFOA;
  1077. {$EXTERNALSYM PFAX_PRINT_INFO}
  1078. TFaxPrintInfo = TFaxPrintInfoA;
  1079. PFaxPrintInfo = PFaxPrintInfoA;
  1080. {$ENDIF UNICODE}
  1081. PFAX_CONTEXT_INFOA = ^FAX_CONTEXT_INFOA;
  1082. {$EXTERNALSYM PFAX_CONTEXT_INFOA}
  1083. _FAX_CONTEXT_INFOA = record
  1084. SizeOfStruct: DWORD; // Size of this structure
  1085. hDC: HDC; // Device Context
  1086. ServerName: array [0..MAX_COMPUTERNAME_LENGTH] of CHAR; // Server name
  1087. end;
  1088. {$EXTERNALSYM _FAX_CONTEXT_INFOA}
  1089. FAX_CONTEXT_INFOA = _FAX_CONTEXT_INFOA;
  1090. {$EXTERNALSYM FAX_CONTEXT_INFOA}
  1091. TFaxContextInfoA = FAX_CONTEXT_INFOA;
  1092. PFaxContextInfoA = PFAX_CONTEXT_INFOA;
  1093. PFAX_CONTEXT_INFOW = ^FAX_CONTEXT_INFOW;
  1094. {$EXTERNALSYM PFAX_CONTEXT_INFOW}
  1095. _FAX_CONTEXT_INFOW = record
  1096. SizeOfStruct: DWORD; // Size of this structure
  1097. hDC: HDC; // Device Context
  1098. ServerName: array [0..MAX_COMPUTERNAME_LENGTH] of WCHAR; // Server name
  1099. end;
  1100. {$EXTERNALSYM _FAX_CONTEXT_INFOW}
  1101. FAX_CONTEXT_INFOW = _FAX_CONTEXT_INFOW;
  1102. {$EXTERNALSYM FAX_CONTEXT_INFOW}
  1103. TFaxContextInfoW = FAX_CONTEXT_INFOW;
  1104. PFaxContextInfoW = PFAX_CONTEXT_INFOW;
  1105. {$IFDEF UNICODE}
  1106. FAX_CONTEXT_INFO = FAX_CONTEXT_INFOW;
  1107. {$EXTERNALSYM FAX_CONTEXT_INFO}
  1108. PFAX_CONTEXT_INFO = PFAX_CONTEXT_INFOW;
  1109. {$EXTERNALSYM PFAX_CONTEXT_INFO}
  1110. TFaxContextInfo = TFaxContextInfoW;
  1111. PFaxContextInfo = PFaxContextInfoW;
  1112. {$ELSE}
  1113. FAX_CONTEXT_INFO = FAX_CONTEXT_INFOA;
  1114. {$EXTERNALSYM FAX_CONTEXT_INFO}
  1115. PFAX_CONTEXT_INFO = PFAX_CONTEXT_INFOA;
  1116. {$EXTERNALSYM PFAX_CONTEXT_INFO}
  1117. TFaxContextInfo = TFaxContextInfoA;
  1118. PFaxContextInfo = PFaxContextInfoA;
  1119. {$ENDIF UNICODE}
  1120. //
  1121. // prototypes
  1122. //
  1123. function FaxConnectFaxServerA(MachineName: LPCSTR; var FaxHandle: HANDLE): BOOL; stdcall;
  1124. {$EXTERNALSYM FaxConnectFaxServerA}
  1125. function FaxConnectFaxServerW(MachineName: LPCWSTR; var FaxHandle: HANDLE): BOOL; stdcall;
  1126. {$EXTERNALSYM FaxConnectFaxServerW}
  1127. function FaxConnectFaxServer(MachineName: LPCTSTR; var FaxHandle: HANDLE): BOOL; stdcall;
  1128. {$EXTERNALSYM FaxConnectFaxServer}
  1129. function FaxClose(FaxHandle: HANDLE): BOOL; stdcall;
  1130. {$EXTERNALSYM FaxClose}
  1131. type
  1132. FAX_ENUM_PORT_OPEN_TYPE = (
  1133. PORT_OPEN_FILLER0,
  1134. PORT_OPEN_QUERY,
  1135. PORT_OPEN_MODIFY);
  1136. {$EXTERNALSYM FAX_ENUM_PORT_OPEN_TYPE}
  1137. TFaxEnumPortOpenType = FAX_ENUM_PORT_OPEN_TYPE;
  1138. function FaxOpenPort(FaxHandle: HANDLE; DeviceId: DWORD; Flags: DWORD; var FaxPortHandle: HANDLE): BOOL; stdcall;
  1139. {$EXTERNALSYM FaxOpenPort}
  1140. function FaxCompleteJobParamsA(var JobParams: PFAX_JOB_PARAMA; var CoverpageInfo: PFAX_COVERPAGE_INFOA): BOOL; stdcall;
  1141. {$EXTERNALSYM FaxCompleteJobParamsA}
  1142. function FaxCompleteJobParamsW(var JobParams: PFAX_JOB_PARAMW; var CoverpageInfo: PFAX_COVERPAGE_INFOW): BOOL; stdcall;
  1143. {$EXTERNALSYM FaxCompleteJobParamsW}
  1144. function FaxCompleteJobParams(var JobParams: PFAX_JOB_PARAM; var CoverpageInfo: PFAX_COVERPAGE_INFO): BOOL; stdcall;
  1145. {$EXTERNALSYM FaxCompleteJobParams}
  1146. function FaxSendDocumentA(FaxHandle: HANDLE; FileName: LPCSTR; JobParams: PFAX_JOB_PARAMA; CoverpageInfo: PFAX_COVERPAGE_INFOA; FaxJobId: LPDWORD): BOOL; stdcall;
  1147. {$EXTERNALSYM FaxSendDocumentA}
  1148. function FaxSendDocumentW(FaxHandle: HANDLE; FileName: LPCWSTR; JobParams: PFAX_JOB_PARAMW; CoverpageInfo: PFAX_COVERPAGE_INFOW; FaxJobId: LPDWORD): BOOL; stdcall;
  1149. {$EXTERNALSYM FaxSendDocumentW}
  1150. function FaxSendDocument(FaxHandle: HANDLE; FileName: LPCTSTR; JobParams: PFAX_JOB_PARAM; CoverpageInfo: PFAX_COVERPAGE_INFO; FaxJobId: LPDWORD): BOOL; stdcall;
  1151. {$EXTERNALSYM FaxSendDocument}
  1152. type
  1153. PFAX_RECIPIENT_CALLBACKA = function(FaxHandle: HANDLE; RecipientNumber: DWORD; Context: LPVOID; JobParams: PFAX_JOB_PARAMA; CoverpageInfo: PFAX_COVERPAGE_INFOA): BOOL; stdcall;
  1154. {$EXTERNALSYM PFAX_RECIPIENT_CALLBACKA}
  1155. TFaxRecipientCallbackA = PFAX_RECIPIENT_CALLBACKA;
  1156. PFAX_RECIPIENT_CALLBACKW = function(FaxHandle: HANDLE; RecipientNumber: DWORD; Context: LPVOID; JobParams: PFAX_JOB_PARAMW; CoverpageInfo: PFAX_COVERPAGE_INFOW): BOOL; stdcall;
  1157. {$EXTERNALSYM PFAX_RECIPIENT_CALLBACKW}
  1158. TFaxRecipientCallbackW = PFAX_RECIPIENT_CALLBACKW;
  1159. {$IFDEF UNICODE}
  1160. PFAX_RECIPIENT_CALLBACK = PFAX_RECIPIENT_CALLBACKW;
  1161. {$EXTERNALSYM PFAX_RECIPIENT_CALLBACK}
  1162. TFaxRecipientCallback = TFaxRecipientCallbackW;
  1163. {$ELSE}
  1164. PFAX_RECIPIENT_CALLBACK = PFAX_RECIPIENT_CALLBACKA;
  1165. {$EXTERNALSYM PFAX_RECIPIENT_CALLBACK}
  1166. TFaxRecipientCallback = TFaxRecipientCallbackA;
  1167. {$ENDIF UNICODE}
  1168. function FaxSendDocumentForBroadcastA(FaxHandle: HANDLE; FileName: LPCSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACKA; Context: LPVOID): BOOL; stdcall;
  1169. {$EXTERNALSYM FaxSendDocumentForBroadcastA}
  1170. function FaxSendDocumentForBroadcastW(FaxHandle: HANDLE; FileName: LPCWSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACKW; Context: LPVOID): BOOL; stdcall;
  1171. {$EXTERNALSYM FaxSendDocumentForBroadcastW}
  1172. function FaxSendDocumentForBroadcast(FaxHandle: HANDLE; FileName: LPCTSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACK; Context: LPVOID): BOOL; stdcall;
  1173. {$EXTERNALSYM FaxSendDocumentForBroadcast}
  1174. function FaxEnumJobsA(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRYA; var JobsReturned: DWORD): BOOL; stdcall;
  1175. {$EXTERNALSYM FaxEnumJobsA}
  1176. function FaxEnumJobsW(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRYW; var JobsReturned: DWORD): BOOL; stdcall;
  1177. {$EXTERNALSYM FaxEnumJobsW}
  1178. function FaxEnumJobs(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRY; var JobsReturned: DWORD): BOOL; stdcall;
  1179. {$EXTERNALSYM FaxEnumJobs}
  1180. function FaxGetJobA(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRYA): BOOL; stdcall;
  1181. {$EXTERNALSYM FaxGetJobA}
  1182. function FaxGetJobW(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRYW): BOOL; stdcall;
  1183. {$EXTERNALSYM FaxGetJobW}
  1184. function FaxGetJob(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRY): BOOL; stdcall;
  1185. {$EXTERNALSYM FaxGetJob}
  1186. function FaxSetJobA(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRYA): BOOL; stdcall;
  1187. {$EXTERNALSYM FaxSetJobA}
  1188. function FaxSetJobW(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRYW): BOOL; stdcall;
  1189. {$EXTERNALSYM FaxSetJobW}
  1190. function FaxSetJob(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRY): BOOL; stdcall;
  1191. {$EXTERNALSYM FaxSetJob}
  1192. function FaxGetPageData(FaxHandle: HANDLE; JobId: DWORD; var Buffer: LPBYTE; var BufferSize, ImageWidth, ImageHeight: DWORD): BOOL; stdcall;
  1193. {$EXTERNALSYM FaxGetPageData}
  1194. function FaxGetDeviceStatusA(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUSA): BOOL; stdcall;
  1195. {$EXTERNALSYM FaxGetDeviceStatusA}
  1196. function FaxGetDeviceStatusW(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUSW): BOOL; stdcall;
  1197. {$EXTERNALSYM FaxGetDeviceStatusW}
  1198. function FaxGetDeviceStatus(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUS): BOOL; stdcall;
  1199. {$EXTERNALSYM FaxGetDeviceStatus}
  1200. function FaxAbort(FaxHandle: HANDLE; JobId: DWORD): BOOL; stdcall;
  1201. {$EXTERNALSYM FaxAbort}
  1202. function FaxGetConfigurationA(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATIONA): BOOL; stdcall;
  1203. {$EXTERNALSYM FaxGetConfigurationA}
  1204. function FaxGetConfigurationW(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATIONW): BOOL; stdcall;
  1205. {$EXTERNALSYM FaxGetConfigurationW}
  1206. function FaxGetConfiguration(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATION): BOOL; stdcall;
  1207. {$EXTERNALSYM FaxGetConfiguration}
  1208. function FaxSetConfigurationA(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATIONA): BOOL; stdcall;
  1209. {$EXTERNALSYM FaxSetConfigurationA}
  1210. function FaxSetConfigurationW(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATIONW): BOOL; stdcall;
  1211. {$EXTERNALSYM FaxSetConfigurationW}
  1212. function FaxSetConfiguration(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATION): BOOL; stdcall;
  1213. {$EXTERNALSYM FaxSetConfiguration}
  1214. function FaxGetLoggingCategoriesA(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORYA; var NumberCategories: DWORD): BOOL; stdcall;
  1215. {$EXTERNALSYM FaxGetLoggingCategoriesA}
  1216. function FaxGetLoggingCategoriesW(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORYW; var NumberCategories: DWORD): BOOL; stdcall;
  1217. {$EXTERNALSYM FaxGetLoggingCategoriesW}
  1218. function FaxGetLoggingCategories(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORY; var NumberCategories: DWORD): BOOL; stdcall;
  1219. {$EXTERNALSYM FaxGetLoggingCategories}
  1220. function FaxSetLoggingCategoriesA(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORYA; NumberCategories: DWORD): BOOL; stdcall;
  1221. {$EXTERNALSYM FaxSetLoggingCategoriesA}
  1222. function FaxSetLoggingCategoriesW(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORYW; NumberCategories: DWORD): BOOL; stdcall;
  1223. {$EXTERNALSYM FaxSetLoggingCategoriesW}
  1224. function FaxSetLoggingCategories(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORY; NumberCategories: DWORD): BOOL; stdcall;
  1225. {$EXTERNALSYM FaxSetLoggingCategories}
  1226. function FaxEnumPortsA(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFOA; var PortsReturned: DWORD): BOOL; stdcall;
  1227. {$EXTERNALSYM FaxEnumPortsA}
  1228. function FaxEnumPortsW(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFOW; var PortsReturned: DWORD): BOOL; stdcall;
  1229. {$EXTERNALSYM FaxEnumPortsW}
  1230. function FaxEnumPorts(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFO; var PortsReturned: DWORD): BOOL; stdcall;
  1231. {$EXTERNALSYM FaxEnumPorts}
  1232. function FaxGetPortA(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFOA): BOOL; stdcall;
  1233. {$EXTERNALSYM FaxGetPortA}
  1234. function FaxGetPortW(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFOW): BOOL; stdcall;
  1235. {$EXTERNALSYM FaxGetPortW}
  1236. function FaxGetPort(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFO): BOOL; stdcall;
  1237. {$EXTERNALSYM FaxGetPort}
  1238. function FaxSetPortA(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFOA): BOOL; stdcall;
  1239. {$EXTERNALSYM FaxSetPortA}
  1240. function FaxSetPortW(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFOW): BOOL; stdcall;
  1241. {$EXTERNALSYM FaxSetPortW}
  1242. function FaxSetPort(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFO): BOOL; stdcall;
  1243. {$EXTERNALSYM FaxSetPort}
  1244. function FaxEnumRoutingMethodsA(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHODA; var MethodsReturned: DWORD): BOOL; stdcall;
  1245. {$EXTERNALSYM FaxEnumRoutingMethodsA}
  1246. function FaxEnumRoutingMethodsW(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHODW; var MethodsReturned: DWORD): BOOL; stdcall;
  1247. {$EXTERNALSYM FaxEnumRoutingMethodsW}
  1248. function FaxEnumRoutingMethods(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHOD; var MethodsReturned: DWORD): BOOL; stdcall;
  1249. {$EXTERNALSYM FaxEnumRoutingMethods}
  1250. function FaxEnableRoutingMethodA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; Enabled: BOOL): BOOL; stdcall;
  1251. {$EXTERNALSYM FaxEnableRoutingMethodA}
  1252. function FaxEnableRoutingMethodW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; Enabled: BOOL): BOOL; stdcall;
  1253. {$EXTERNALSYM FaxEnableRoutingMethodW}
  1254. function FaxEnableRoutingMethod(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; Enabled: BOOL): BOOL; stdcall;
  1255. {$EXTERNALSYM FaxEnableRoutingMethod}
  1256. function FaxEnumGlobalRoutingInfoA(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFOA; var MethodsReturned: DWORD): BOOL; stdcall;
  1257. {$EXTERNALSYM FaxEnumGlobalRoutingInfoA}
  1258. function FaxEnumGlobalRoutingInfoW(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFOW; var MethodsReturned: DWORD): BOOL; stdcall;
  1259. {$EXTERNALSYM FaxEnumGlobalRoutingInfoW}
  1260. function FaxEnumGlobalRoutingInfo(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFO; var MethodsReturned: DWORD): BOOL; stdcall;
  1261. {$EXTERNALSYM FaxEnumGlobalRoutingInfo}
  1262. function FaxSetGlobalRoutingInfoA(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFOA): BOOL; stdcall;
  1263. {$EXTERNALSYM FaxSetGlobalRoutingInfoA}
  1264. function FaxSetGlobalRoutingInfoW(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFOW): BOOL; stdcall;
  1265. {$EXTERNALSYM FaxSetGlobalRoutingInfoW}
  1266. function FaxSetGlobalRoutingInfo(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFO): BOOL; stdcall;
  1267. {$EXTERNALSYM FaxSetGlobalRoutingInfo}
  1268. function FaxGetRoutingInfoA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
  1269. {$EXTERNALSYM FaxGetRoutingInfoA}
  1270. function FaxGetRoutingInfoW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
  1271. {$EXTERNALSYM FaxGetRoutingInfoW}
  1272. function FaxGetRoutingInfo(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
  1273. {$EXTERNALSYM FaxGetRoutingInfo}
  1274. function FaxSetRoutingInfoA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
  1275. {$EXTERNALSYM FaxSetRoutingInfoA}
  1276. function FaxSetRoutingInfoW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
  1277. {$EXTERNALSYM FaxSetRoutingInfoW}
  1278. function FaxSetRoutingInfo(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
  1279. {$EXTERNALSYM FaxSetRoutingInfo}
  1280. function FaxInitializeEventQueue(FaxHandle: HANDLE; CompletionPort: HANDLE; CompletionKey: ULONG_PTR; hWnd: HWND; MessageStart: UINT): BOOL; stdcall;
  1281. {$EXTERNALSYM FaxInitializeEventQueue}
  1282. procedure FaxFreeBuffer(Buffer: LPVOID); stdcall;
  1283. {$EXTERNALSYM FaxFreeBuffer}
  1284. function FaxStartPrintJobA(PrinterName: LPCSTR; const PrintInfo: FAX_PRINT_INFOA; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFOA): BOOL; stdcall;
  1285. {$EXTERNALSYM FaxStartPrintJobA}
  1286. function FaxStartPrintJobW(PrinterName: LPCWSTR; const PrintInfo: FAX_PRINT_INFOW; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFOW): BOOL; stdcall;
  1287. {$EXTERNALSYM FaxStartPrintJobW}
  1288. function FaxStartPrintJob(PrinterName: LPCTSTR; const PrintInfo: FAX_PRINT_INFO; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFO): BOOL; stdcall;
  1289. {$EXTERNALSYM FaxStartPrintJob}
  1290. function FaxPrintCoverPageA(const FaxContextInfo: FAX_CONTEXT_INFOA; const CoverPageInfo: FAX_COVERPAGE_INFOA): BOOL; stdcall;
  1291. {$EXTERNALSYM FaxPrintCoverPageA}
  1292. function FaxPrintCoverPageW(const FaxContextInfo: FAX_CONTEXT_INFOW; const CoverPageInfo: FAX_COVERPAGE_INFOW): BOOL; stdcall;
  1293. {$EXTERNALSYM FaxPrintCoverPageW}
  1294. function FaxPrintCoverPage(const FaxContextInfo: FAX_CONTEXT_INFO; const CoverPageInfo: FAX_COVERPAGE_INFO): BOOL; stdcall;
  1295. {$EXTERNALSYM FaxPrintCoverPage}
  1296. function FaxRegisterServiceProviderW(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL; stdcall;
  1297. {$EXTERNALSYM FaxRegisterServiceProviderW}
  1298. function FaxRegisterServiceProvider(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL;
  1299. {$EXTERNALSYM FaxRegisterServiceProvider}
  1300. function FaxUnregisterServiceProviderW(DeviceProvider: LPCWSTR): BOOL; stdcall;
  1301. {$EXTERNALSYM FaxUnregisterServiceProviderW}
  1302. function FaxUnregisterServiceProvider(DeviceProvider: LPCWSTR): BOOL; stdcall;
  1303. {$EXTERNALSYM FaxUnregisterServiceProvider}
  1304. type
  1305. PFAXUNREGISTERSERVICEPROVIDERW = function(DeviceProvider: LPCWSTR): BOOL; stdcall;
  1306. {$EXTERNALSYM PFAXUNREGISTERSERVICEPROVIDERW}
  1307. PFAXUNREGISTERSERVICEPROVIDER = PFAXUNREGISTERSERVICEPROVIDERW;
  1308. {$EXTERNALSYM PFAXUNREGISTERSERVICEPROVIDER}
  1309. type
  1310. PFAX_ROUTING_INSTALLATION_CALLBACKW = function(FaxHandle: HANDLE; Context: LPVOID; MethodName, FriendlyName, FunctionName, Guid: LPWSTR): BOOL; stdcall;
  1311. {$EXTERNALSYM PFAX_ROUTING_INSTALLATION_CALLBACKW}
  1312. TFaxRoutingInstallationCallbackW = PFAX_ROUTING_INSTALLATION_CALLBACKW;
  1313. PFAX_ROUTING_INSTALLATION_CALLBACK = PFAX_ROUTING_INSTALLATION_CALLBACKW;
  1314. {$EXTERNALSYM PFAX_ROUTING_INSTALLATION_CALLBACK}
  1315. TFaxRoutingInstallationCallback = TFaxRoutingInstallationCallbackW;
  1316. function FaxRegisterRoutingExtensionW(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL; stdcall;
  1317. {$EXTERNALSYM FaxRegisterRoutingExtensionW}
  1318. function FaxRegisterRoutingExtension(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL;
  1319. {$EXTERNALSYM FaxRegisterRoutingExtension}
  1320. function FaxUnregisterRoutingExtensionA(hFaxHandle: HANDLE; lpctstrExtensionName: LPCSTR): BOOL; stdcall;
  1321. {$EXTERNALSYM FaxUnregisterRoutingExtensionA}
  1322. function FaxUnregisterRoutingExtensionW(hFaxHandle: HANDLE; lpctstrExtensionName: LPCWSTR): BOOL; stdcall;
  1323. {$EXTERNALSYM FaxUnregisterRoutingExtensionW}
  1324. function FaxUnregisterRoutingExtension(hFaxHandle: HANDLE; lpctstrExtensionName: LPCTSTR): BOOL; stdcall;
  1325. {$EXTERNALSYM FaxUnregisterRoutingExtension}
  1326. function FaxAccessCheck(FaxHandle: HANDLE; AccessMask: DWORD): BOOL; stdcall;
  1327. {$EXTERNALSYM FaxAccessCheck}
  1328. //
  1329. // Fax Specific Access Rights
  1330. //
  1331. const
  1332. FAX_JOB_SUBMIT = $0001;
  1333. {$EXTERNALSYM FAX_JOB_SUBMIT}
  1334. FAX_JOB_QUERY = $0002;
  1335. {$EXTERNALSYM FAX_JOB_QUERY}
  1336. FAX_CONFIG_QUERY = $0004;
  1337. {$EXTERNALSYM FAX_CONFIG_QUERY}
  1338. FAX_CONFIG_SET = $0008;
  1339. {$EXTERNALSYM FAX_CONFIG_SET}
  1340. FAX_PORT_QUERY = $0010;
  1341. {$EXTERNALSYM FAX_PORT_QUERY}
  1342. FAX_PORT_SET = $0020;
  1343. {$EXTERNALSYM FAX_PORT_SET}
  1344. FAX_JOB_MANAGE = $0040;
  1345. {$EXTERNALSYM FAX_JOB_MANAGE}
  1346. FAX_READ = STANDARD_RIGHTS_READ or FAX_JOB_QUERY or FAX_CONFIG_QUERY or FAX_PORT_QUERY;
  1347. {$EXTERNALSYM FAX_READ}
  1348. FAX_WRITE = STANDARD_RIGHTS_WRITE or FAX_JOB_SUBMIT ;
  1349. {$EXTERNALSYM FAX_WRITE}
  1350. FAX_ALL_ACCESS = STANDARD_RIGHTS_ALL or FAX_JOB_SUBMIT or FAX_JOB_QUERY or FAX_CONFIG_QUERY or
  1351. FAX_CONFIG_SET or FAX_PORT_QUERY or FAX_PORT_SET or FAX_JOB_MANAGE;
  1352. {$EXTERNALSYM FAX_ALL_ACCESS}
  1353. implementation
  1354. const
  1355. winfax = 'winfax.dll';
  1356. {$IFDEF UNICODE}
  1357. AWSuffix = 'W';
  1358. {$ELSE}
  1359. AWSuffix = 'A';
  1360. {$ENDIF UNICODE}
  1361. function FaxConnectFaxServerA; external winfax name 'FaxConnectFaxServerA';
  1362. function FaxConnectFaxServerW; external winfax name 'FaxConnectFaxServerW';
  1363. function FaxConnectFaxServer; external winfax name 'FaxConnectFaxServer' + AWSuffix;
  1364. function FaxClose; external winfax name 'FaxClose';
  1365. function FaxOpenPort; external winfax name 'FaxOpenPort';
  1366. function FaxCompleteJobParamsA; external winfax name 'FaxCompleteJobParamsA';
  1367. function FaxCompleteJobParamsW; external winfax name 'FaxCompleteJobParamsW';
  1368. function FaxCompleteJobParams; external winfax name 'FaxCompleteJobParams' + AWSuffix;
  1369. function FaxSendDocumentA; external winfax name 'FaxSendDocumentA';
  1370. function FaxSendDocumentW; external winfax name 'FaxSendDocumentW';
  1371. function FaxSendDocument; external winfax name 'FaxSendDocument' + AWSuffix;
  1372. function FaxSendDocumentForBroadcastA; external winfax name 'FaxSendDocumentForBroadcastA';
  1373. function FaxSendDocumentForBroadcastW; external winfax name 'FaxSendDocumentForBroadcastW';
  1374. function FaxSendDocumentForBroadcast; external winfax name 'FaxSendDocumentForBroadcast' + AWSuffix;
  1375. function FaxEnumJobsA; external winfax name 'FaxEnumJobsA';
  1376. function FaxEnumJobsW; external winfax name 'FaxEnumJobsW';
  1377. function FaxEnumJobs; external winfax name 'FaxEnumJobs' + AWSuffix;
  1378. function FaxGetJobA; external winfax name 'FaxGetJobA';
  1379. function FaxGetJobW; external winfax name 'FaxGetJobW';
  1380. function FaxGetJob; external winfax name 'FaxGetJob' + AWSuffix;
  1381. function FaxSetJobA; external winfax name 'FaxSetJobA';
  1382. function FaxSetJobW; external winfax name 'FaxSetJobW';
  1383. function FaxSetJob; external winfax name 'FaxSetJob' + AWSuffix;
  1384. function FaxGetPageData; external winfax name 'FaxGetPageData';
  1385. function FaxGetDeviceStatusA; external winfax name 'FaxGetDeviceStatusA';
  1386. function FaxGetDeviceStatusW; external winfax name 'FaxGetDeviceStatusW';
  1387. function FaxGetDeviceStatus; external winfax name 'FaxGetDeviceStatus' + AWSuffix;
  1388. function FaxAbort; external winfax name 'FaxAbort';
  1389. function FaxGetConfigurationA; external winfax name 'FaxGetConfigurationA';
  1390. function FaxGetConfigurationW; external winfax name 'FaxGetConfigurationW';
  1391. function FaxGetConfiguration; external winfax name 'FaxGetConfiguration' + AWSuffix;
  1392. function FaxSetConfigurationA; external winfax name 'FaxSetConfigurationA';
  1393. function FaxSetConfigurationW; external winfax name 'FaxSetConfigurationW';
  1394. function FaxSetConfiguration; external winfax name 'FaxSetConfiguration' + AWSuffix;
  1395. function FaxGetLoggingCategoriesA; external winfax name 'FaxGetLoggingCategoriesA';
  1396. function FaxGetLoggingCategoriesW; external winfax name 'FaxGetLoggingCategoriesW';
  1397. function FaxGetLoggingCategories; external winfax name 'FaxGetLoggingCategories' + AWSuffix;
  1398. function FaxSetLoggingCategoriesA; external winfax name 'FaxSetLoggingCategoriesA';
  1399. function FaxSetLoggingCategoriesW; external winfax name 'FaxSetLoggingCategoriesW';
  1400. function FaxSetLoggingCategories; external winfax name 'FaxSetLoggingCategories' + AWSuffix;
  1401. function FaxEnumPortsA; external winfax name 'FaxEnumPortsA';
  1402. function FaxEnumPortsW; external winfax name 'FaxEnumPortsW';
  1403. function FaxEnumPorts; external winfax name 'FaxEnumPorts' + AWSuffix;
  1404. function FaxGetPortA; external winfax name 'FaxGetPortA';
  1405. function FaxGetPortW; external winfax name 'FaxGetPortW';
  1406. function FaxGetPort; external winfax name 'FaxGetPort' + AWSuffix;
  1407. function FaxSetPortA; external winfax name 'FaxSetPortA';
  1408. function FaxSetPortW; external winfax name 'FaxSetPortW';
  1409. function FaxSetPort; external winfax name 'FaxSetPort' + AWSuffix;
  1410. function FaxEnumRoutingMethodsA; external winfax name 'FaxEnumRoutingMethodsA';
  1411. function FaxEnumRoutingMethodsW; external winfax name 'FaxEnumRoutingMethodsW';
  1412. function FaxEnumRoutingMethods; external winfax name 'FaxEnumRoutingMethods' + AWSuffix;
  1413. function FaxEnableRoutingMethodA; external winfax name 'FaxEnableRoutingMethodA';
  1414. function FaxEnableRoutingMethodW; external winfax name 'FaxEnableRoutingMethodW';
  1415. function FaxEnableRoutingMethod; external winfax name 'FaxEnableRoutingMethod' + AWSuffix;
  1416. function FaxEnumGlobalRoutingInfoA; external winfax name 'FaxEnumGlobalRoutingInfoA';
  1417. function FaxEnumGlobalRoutingInfoW; external winfax name 'FaxEnumGlobalRoutingInfoW';
  1418. function FaxEnumGlobalRoutingInfo; external winfax name 'FaxEnumGlobalRoutingInfo' + AWSuffix;
  1419. function FaxSetGlobalRoutingInfoA; external winfax name 'FaxSetGlobalRoutingInfoA';
  1420. function FaxSetGlobalRoutingInfoW; external winfax name 'FaxSetGlobalRoutingInfoW';
  1421. function FaxSetGlobalRoutingInfo; external winfax name 'FaxSetGlobalRoutingInfo' + AWSuffix;
  1422. function FaxGetRoutingInfoA; external winfax name 'FaxGetRoutingInfoA';
  1423. function FaxGetRoutingInfoW; external winfax name 'FaxGetRoutingInfoW';
  1424. function FaxGetRoutingInfo; external winfax name 'FaxGetRoutingInfo' + AWSuffix;
  1425. function FaxSetRoutingInfoA; external winfax name 'FaxSetRoutingInfoA';
  1426. function FaxSetRoutingInfoW; external winfax name 'FaxSetRoutingInfoW';
  1427. function FaxSetRoutingInfo; external winfax name 'FaxSetRoutingInfo' + AWSuffix;
  1428. function FaxInitializeEventQueue; external winfax name 'FaxInitializeEventQueue';
  1429. procedure FaxFreeBuffer; external winfax name 'FaxFreeBuffer';
  1430. function FaxStartPrintJobA; external winfax name 'FaxStartPrintJobA';
  1431. function FaxStartPrintJobW; external winfax name 'FaxStartPrintJobW';
  1432. function FaxStartPrintJob; external winfax name 'FaxStartPrintJob' + AWSuffix;
  1433. function FaxPrintCoverPageA; external winfax name 'FaxPrintCoverPageA';
  1434. function FaxPrintCoverPageW; external winfax name 'FaxPrintCoverPageW';
  1435. function FaxPrintCoverPage; external winfax name 'FaxPrintCoverPage' + AWSuffix;
  1436. function FaxRegisterServiceProviderW; external winfax name 'FaxRegisterServiceProviderW';
  1437. function FaxRegisterServiceProvider(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL;
  1438. begin
  1439. Result := FaxRegisterServiceProviderW(DeviceProvider, FriendlyName, ImageName, TspName);
  1440. end;
  1441. function FaxUnregisterServiceProviderW; external winfax name 'FaxUnregisterServiceProviderW';
  1442. function FaxUnregisterServiceProvider(DeviceProvider: LPCWSTR): BOOL;
  1443. begin
  1444. Result := FaxUnregisterServiceProviderW(DeviceProvider);
  1445. end;
  1446. function FaxRegisterRoutingExtensionW; external winfax name 'FaxRegisterRoutingExtensionW';
  1447. function FaxRegisterRoutingExtension(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL;
  1448. begin
  1449. Result := FaxRegisterRoutingExtensionW(FaxHandle, ExtensionName, FriendlyName, ImageName, CallBack, Context);
  1450. end;
  1451. function FaxUnregisterRoutingExtensionA; external winfax name 'FaxUnregisterRoutingExtensionA';
  1452. function FaxUnregisterRoutingExtensionW; external winfax name 'FaxUnregisterRoutingExtensionW';
  1453. function FaxUnregisterRoutingExtension; external winfax name 'FaxUnregisterRoutingExtension' + AWSuffix;
  1454. function FaxAccessCheck; external winfax name 'FaxAccessCheck';
  1455. end.