jwawinfax.pas 65 KB

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