1、April 2001Extensions for Financial Services (XFS) interfacespecification Release 3.0 Part 1: ApplicationProgramming Interface (API) Service ProviderInterface (SPI) Programmers ReferenceCWA 14050-1Englische Fassung CWA 14050-1:2000ICS 35.200; 35.240.15; 35.240.40Erweiterungen fr die Schnittstellenspe
2、zifikation fr Finanzdienst-leistungen (XFS) Version 3.0 Teil 1: Application ProgrammingInterface (API) Service Provider Interface (SPI) ProgrammierhandbuchNationales VorwortDieses CEN Workshop Agreement CWA 14050-1, das vom CEN/ISSS XFS Workshop erarbeitet wurde,wird ausschlielich in englischer Spra
3、che zur Verfgung gestellt.CEN Workshop Agreements werden im Rahmen eines Konsortiums entwickelt. Sie unterscheiden sich vonEuropischen Normen dadurch, dass sie grundstzlich kein ffentliches Einspruchsverfahren durchlaufenund dass auch keine nationale Meinungsbildung stattfindet. Im Gegensatz zu Euro
4、pischen Normen, dieden Konsens aller interessierten Kreise darstellen, haben CEN Workshop Agreements lediglich dieZustimmung der unmittelbar beteiligten Mitglieder des Konsortiums gefunden.Fr den Inhalt sind ausschlielich die Mitglieder des Konsortiums verantwortlich (siehe ergnzendeHinweise im CWA-
5、Vorwort). Weder das CEN-Zentralsekretariat, noch die CEN-Mitglieder haben den Inhaltauf eventuelle Fehler oder Widersprche zu Normen und Rechtsvorschriften geprft.Fortsetzung 141 Seiten CWA Beuth Verlag GmbH, 2001 .Jede Art der Vervielfltigung, auch auszugsweise, Ref. Nr. DIN CWA 14050-1:2001-04nur
6、mit Genehmigung des Beuth Verlages gestattet. RW DIN CWA Preisgr. 18Alleinverkauf der Normen durch Beuth Verlag GmbH, 10772 BerlinB55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Leerseite B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Rue de Stassart, 36 B-
7、1050 BruxellesTel : +32 2 550 08 11 Fax : +32 2 550 08 19EUROPEAN COMMITTEE FOR STANDARDIZATION COMIT EUROPEN DE NORMALISATION EUROPISCHES KOMITEE FR NORMUNG WORKSHOPCWA 14050-1AGREEMENTNovember 2000ICS 35.200; 35.240.15; 35.240.40Extensions for Financial Services (XFS) interface specification -Rele
8、ase 3.0 - Part 1: Application Programming Interface (API) - ServiceProvider Interface (SPI); Programmers Reference 2000 CEN All rights of exploitation in any form and by any means reserved world-wide forCEN National MembersRef. No CWA 14050-1:2000 EThis CEN Workshop Agreement can in no way be held a
9、s being an official standardas developed by CEN National Members.B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 2CWA 14050-1:2000Table of ContentsForeword 51. Background to Release 3.0.72. References . 83. XFS (Extensions for Financial Services) Overview 93.1 ARCHITECTURE
10、. 103.2 API AND SPI SUMMARY. 123.3 DEVICE CLASSES 134. Architectural and Implementation Issues . 144.1 THE XFS MANAGER 154.2 SERVICE PROVIDERS . 164.2.1 Service Provider Functionality 164.2.2 Service Provider “Packaging” 164.3 ASYNCHRONOUS, SYNCHRONOUS AND IMMEDIATE FUNCTIONS 174.3.1 Asynchronous Fu
11、nctions . 174.3.2 Synchronous Functions . 174.3.3 Immediate Functions . 184.4 PROCESSING API FUNCTIONS 194.5 OPENING A SESSION 204.6 CLOSING A SESSION 214.7 CONFIGURATION INFORMATION 224.8 EXCLUSIVE SERVICE AND DEVICE ACCESS . 264.8.1 Lock Policy for Independent Devices 264.8.2 Compound Devices 274.
12、9 TIMEOUT . 294.10 FUNCTION STATUS RETURN . 304.11 NOTIFICATION MECHANISMS REGISTERING FOR EVENTS. 314.12 APPLICATION PROCESSES, THREADS AND BLOCKING FUNCTIONS . 334.13 VENDOR DEPENDENT MODE 354.14 MEMORY MANAGEMENT. 365. Application Programming Interface (API) Functions. 385.1 WFSCANCELASYNCREQUEST
13、 . 405.2 WFSCANCELBLOCKINGCALL 415.3 WFSCLEANUP 425.4 WFSCLOSE 435.5 WFSASYNCCLOSE 445.6 WFSCREATEAPPHANDLE . 45B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 3CWA 14050-1:20005.7 WFSDEREGISTER . 465.8 WFSASYNCDEREGISTER. 475.9 WFSDESTROYAPPHANDLE . 495.10 WFSEXECUTE 505.1
14、1 WFSASYNCEXECUTE 525.12 WFSFREERESULT 545.13 WFSGETINFO . 555.14 WFSASYNCGETINFO 575.15 WFSISBLOCKING 595.16 WFSLOCK 605.17 WFSASYNCLOCK . 625.18 WFSOPEN645.19 WFSASYNCOPEN . 675.20 WFSREGISTER . 705.21 WFSASYNCREGISTER. 725.22 WFSSETBLOCKINGHOOK . 745.23 WFSSTARTUP 755.24 WFSUNHOOKBLOCKINGHOOK 775
15、.25 WFSUNLOCK 785.26 WFSASYNCUNLOCK . 796. Service Provider Interface (SPI) Functions. 806.1 WFPCANCELASYNCREQUEST . 816.2 WFPCLOSE 826.3 WFPDEREGISTER . 836.4 WFPEXECUTE 856.5 WFPGETINFO . 876.6 WFPLOCK 896.7 WFPOPEN906.8 WFPREGISTER . 936.9 WFPSETTRACELEVEL 946.10 WFPUNLOADSERVICE. 966.11 WFPUNLOC
16、K 977. Support Functions. 987.1 WFMALLOCATEBUFFER 987.2 WFMALLOCATEMORE. 997.3 WFMFREEBUFFER . 1007.4 WFMGETTRACELEVEL . 1017.5 WFMKILLTIMER . 1027.6 WFMOUTPUTTRACEDATA. 103B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 4CWA 14050-1:20007.7 WFMRELEASEDLL. 1047.8 WFMSETTIME
17、R 1057.9 WFMSETTRACELEVEL 1068. Configuration Functions. 1088.1 WFMCLOSEKEY. 1088.2 WFMCREATEKEY . 1098.3 WFMDELETEKEY . 1108.4 WFMDELETEVALUE 1118.5 WFMENUMKEY 1128.6 WFMENUMVALUE. 1138.7 WFMOPENKEY. 1148.8 WFMQUERYVALUE . 1158.9 WFMSETVALUE 1169. Data Structures 1179.1 WFSRESULT 1179.2 WFSVERSION
18、11810. Messages . 11910.1 COMMAND COMPLETIONS AND EVENTS 11910.1.1 Command Completion Messages 11910.1.2 Event Messages . 11910.2 TIMER EVENTS 12010.3 DEVICE STATUS CHANGES. 12110.4 UNDELIVERABLE MESSAGES 12210.5 APPLICATION DISCONNECT 12310.6 HARDWARE AND SOFTWARE ERRORS. 12410.7 LOCK REQUESTED. 12
19、610.8 VERSION NEGOTIATION FAILURES 12711. Error Codes 12812. Appendix A - Planned Enhancements and Extensions . 13112.1 EVENT AND SYSTEM MANAGEMENT 13213. Appendix B - XFS Workshop Contacts . 13314. Appendix D - C-Header files . 13414.1 XFSAPI.H 13414.2 XFSADMIN.H 13914.3 XFSCONF.H 14014.4 XFSSPI.H
20、141B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 5CWA 14050-1:2000ForewordThis CWA is revision 3.0 of the XFS interface specification.The move from an XFS 2.0 specification (CWA 13449) to a 3.0 specification has been prompted by a series offactors.Initially, there has bee
21、n a technical imperative to extend the scope of the existing specification of the XFSManager to include new devices, such as the Card Embossing Unit.Similarly, there has also been pressure, through implementation experience and the advance of the Microsofttechnology, to extend the functionality and
22、capabilities of the existing devices covered by the specification.Finally, it is also clear that our customers and the market are asking for an update to a specification, which isnow over 2 years old. Increasing market acceptance and the need to meet this demand is driving the Workshoptowards this r
23、elease.The clear direction of the CEN/ISSS XFS Workshop, therefore, is the delivery of a new Release 3.0specification based on a C API. It will be delivered with the promise of the protection of technical investment forexisting applications and the design to safeguard future developments.The CEN/ISS
24、S XFS Workshop gathers suppliers as well as banks and other financial service companies. A listof companies participating in this Workshop and in support of this CWA is available from the CEN/ISSSSecretariat.This CWA was formally approved by the XFS Workshop meeting on 2000-10-18. The specification
25、iscontinuously reviewed and commented in the CEN/ISSS Workshop on XFS. It is therefore expected that anupdate of the specification will be published in due time as a CWA, superseding this revision 3.0.The CWA is published as a multi-part document, consisting of:Part 1: Application Programming Interf
26、ace (API) - Service Provider Interface (SPI); Programmers ReferencePart 2: Service Classes Definition; Programmers ReferencePart 3: Printer Device Class Interface - Programmers ReferencePart 4: Identification Card Device Class Interface - Programmers ReferencePart 5: Cash Dispenser Device Class Inte
27、rface - Programmers ReferencePart 6: PIN Keypad Device Class Interface - Programmers ReferencePart 7: Check Reader/Scanner Device Class Interface - Programmers ReferencePart 8: Depository Device Class Interface - Programmers ReferencePart 9: Text Terminal Unit Device Class Interface - Programmers Re
28、ferencePart 10: Sensors and Indicators Unit Device Class Interface - Programmers ReferencePart 11: Vendor Dependent Mode Device Class Interface - Programmers ReferencePart 12: Camera Device Class Interface - Programmers ReferencePart 13: Alarm Device Class Interface - Programmers ReferencePart 14: C
29、ard Embossing Unit Class Interface - Programmers ReferencePart 15: Cash In Module Device Class Interface- Programmers ReferencePart 16: Application Programming Interface (API) - Service Provider Interface (SPI) - Migration from Version2.0 (see CWA 13449) to Version 3.0 (this CWA) - Programmers Refer
30、encePart 17: Printer Device Class Interface - Migration from Version 2.0 (see CWA 13449) to Version 3.0 (thisCWA) - Programmers ReferenceB55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 6CWA 14050-1:2000Part 18: Identification Card Device Class Interface - Migration from Ver
31、sion 2.0 (see CWA 13449) to Version3.0 (this CWA) - Programmers ReferencePart 19: Cash Dispenser Device Class Interface - Migration from Version 2.0 (see CWA 13449) to Version 3.0(this CWA) - Programmers ReferencePart 20: PIN Keypad Device Class Interface - Migration from Version 2.0 (see CWA 13449)
32、 to Version 3.0 (thisCWA) - Programmers ReferencePart 21: Depository Device Class Interface - Migration from Version 2.0 (see CWA 13449) to Version 3.0 (thisCWA) - Programmers ReferencePart 22: Text Terminal Unit Device Class Interface - Migration from Version 2.0 (see CWA 13449) to Version3.0 (this
33、 CWA) - Programmers ReferencePart 23: Sensors and Indicators Unit Device Class Interface - Migration from Version 2.0 (see CWA 13449) toVersion 3.0 (this CWA) - Programmers ReferencePart 24: Camera Device Class Interface - Migration from Version 2.0 (see CWA 13449) to Version 3.0 (thisCWA) - Program
34、mers ReferencePart 25: Identification Card Device Class Interface - PC/SC Integration GuidelinesIn addition to these Programmers Reference specifications, the reader of this CWA is also referred to acomplementary document, called Release Notes. The Release Notes contain clarifications and explanatio
35、ns onthe CWA specifications, which are not requiring functional changes. The current version of the Release Notes isavailable online from http:/www.cenorm.be/isss/Workshop/XFS.The information in this document represents the Workshops current views on the issues discussed as of the dateof publication
36、. It is furnished for informational purposes only and is subject to change without notice.CEN/ISSS makes no warranty, express or implied, with respect to this document.Revision History:1.0 May 24, 1993 Initial release of API and SPI specification1.11 February 3, 1995 Separation of specification into
37、 separate documents for API/SPIand service class definitions; with updates.2.00 November 11, 1996 Updated release encompassing self-service environment.3.00 October 18, 2000 For a detailed description see CWA 14050-16API/SPI migration document from version 2.00 to version 3.00,revision 1.00, October
38、 18th2000.B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 7CWA 14050-1:20001. Background to Release 3.0The CEN XFS Workshop is a continuation of the Banking Solution Vendors Council workshop and maintains atechnical commitment to the Win 32 API. However, the XFS Workshop ha
39、s extended the franchise of multivendor software by encouraging the participation of both banks and vendors to take part in the deliberations ofthe creation of an industry standard. This move towards opening the participation beyond the BSVCs originalmembership has been very succesful with a current
40、 membership level of more than 20 companies.The fundamental aims of the XFS Workshop are to promote a clear and unambiguous specification for bothservice providers and application developers. This has been achieved to date by sub groups workingelectronically and quarterly meetings.The move from an X
41、FS 2.0 specification to a 3.0 specification has been prompted by a series of factors. Initially,there has been a technical imperative to extend the scope of the existing specification of the XFS Manager toinclude new devices, such as the Card Embossing Unit.Similarly, there has also been pressure, t
42、hrough implementation experience and the advance of the Microsofttechnology, to extend the functionality and capabilities of the existing devices covered by the specification.Finally, it is also clear that our customers and the market are asking for an update to a specification, which isnow over 2 y
43、ears old. Increasing market acceptance and the need to meet this demand is driving the Workshoptowards this release.The clear direction of the XFS Workshop, therefore, is the delivery of a new Release 3.0 specification based ona C API. It will be delivered with the promise of the protection of techn
44、ical investment for existing applicationsand the design to safeguard future developments.B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 8CWA 14050-1:20002. References1. XFS Service Classes Definition, Programmers Reference Revision 3.00, October 18, 2000B55EB1B3E14C22109E918E8EA43EDB30F09CC9B7EF8DD9NormCD - Stand 2007-03 Page 9CWA 14050-1:20003. XFS (Extensions for Financial Services) OverviewA key eleme