Dppccsccompe

所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:252KB
下载次数:8
上传日期:2012-07-16 20:55:37
上 传 者clarifyss
说明:  Delphi 用的PSCS控件源码即源码实例程序源码,本本人稍作修改了源码实例程序源码 可直接使用。 已通过测试。
(PSCS control source in Delphi source instance of the program source code, and this I slightly modified the source instance of the program source code can be used directly. Has been tested.)

文件列表:
Dppccsccompe\pcsccomp\FirstTest.dcu (12742, 2008-03-21)
Dppccsccompe\pcsccomp\FirstTest.dfm (4196, 2008-03-21)
Dppccsccompe\pcsccomp\FirstTest.pas (5919, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCConnector.dcr (484, 2002-12-30)
Dppccsccompe\pcsccomp\PCSCConnector.dcu (19825, 2008-03-25)
Dppccsccompe\pcsccomp\PCSCConnector.pas (22840, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCTest.dpr (196, 2002-12-24)
Dppccsccompe\pcsccomp\PCSCTest.dproj (3839, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCTest.dproj.local (62, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCTest.dsk (11600, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCTest.exe (446976, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCTest.identcache (131, 2008-03-21)
Dppccsccompe\pcsccomp\PCSCTest.res (1536, 2002-12-25)
Dppccsccompe\pcsccomp\PCSCTest.~dsk (9773, 2008-02-03)
Dppccsccompe\pcsccomp\pklPcsc.dcu (1944, 2008-03-15)
Dppccsccompe\pcsccomp\pklPcsc.dpk (578, 2008-01-25)
Dppccsccompe\pcsccomp\pklPcsc.dproj (3583, 2008-03-15)
Dppccsccompe\pcsccomp\pklPcsc.dproj.local (272, 2008-03-15)
Dppccsccompe\pcsccomp\pklPcsc.dsk (10093, 2008-03-15)
Dppccsccompe\pcsccomp\pklPcsc.identcache (72, 2008-03-15)
Dppccsccompe\pcsccomp\pklPcsc.res (5940, 2008-03-15)
Dppccsccompe\pcsccomp\pklPcsc.~dsk (8494, 2008-02-03)
Dppccsccompe\pcsccomp\SCardErr.dcu (3370, 2008-03-25)
Dppccsccompe\pcsccomp\SCardErr.pas (17862, 2002-12-29)
Dppccsccompe\pcsccomp\WinSCard.dcu (17377, 2008-03-25)
Dppccsccompe\pcsccomp\WinSCard.pas (68406, 2002-12-29)
Dppccsccompe\pcsccomp\WinSmCrd.dcu (9964, 2008-03-25)
Dppccsccompe\pcsccomp\WinSmCrd.pas (23819, 2002-12-28)
Dppccsccompe\pcsccomp (0, 2008-03-29)
Dppccsccompe (0, 2012-03-18)

The PCSC Connector Component for Delphi The component has the following properties, methods and events: Methods: constructor Create(AOwner: TComponent); override; destructor Destroy; override; Obvious what these do function Init: boolean; Init tries to establish a connection with the SmartCard API and to read the list of installed readers. If the connection is successfull, and a minimum of one reader is found, TRUE is returned function Open: boolean; Open starts watching the selected reader for status changes procedure Close; Close cancels all open requests and finishes watching the reader function Connect: boolean; Connect tries to connect to the card in the selected reader. If successful, TRUE is returned procedure Disconnect; Disconnect disconnects from the card in the selected reader function GetResponseFromCard(const apdu: string): string; function GetResponseFromCard(const command : string; var data : string; var sw1, sw2: byte): boolean; Let you send APDUs to the card. Either provide a complete APDU and get the resulting APDU as a string, or provide the command (CLA,INS,P1,P2,P3) and DATA and get SW1, SW2 and DATA as response and TRUE as result if the request was successful Properties: property ReaderList: TStringList; property UseReaderNum: integer; ReaderList holds the list of available readers. It is filled by calling Init. UseReaderNum points to the Reader to use in ReaderList or is set to -1 if no reader is selected property NumReaders: integer; Holds the number of available readers property Connected: boolean; TRUE if connected to the reader (the reader MAY BE empty) property Opened: boolean; TRUE if a reader is being watched property ReaderState: cardinal; holds the last status of the reader, see WinSCard.pas property AttrProtocol: integer; the protocol used to communicate with the current card property AttrICCType: string; the ICC type of the current card property AttrCardATR: string; the ATR of the current card property AttrVendorName: string; the vendor name of the reader property AttrVendorSerial: string; the serial number of the reader Events: property OnCardInserted : TPCSCCardEvent fires when a card is inserted in the reader property OnCardActive : TPCSCCardEvent fires when a inserted card is recognised and may be accessed. The Attr-propertys are filled beforehand property OnCardRemoved : TPCSCCardEvent fires when a inserted card is removed from the reader property OnCardInvalid : TPCSCCardEvent fires when a inserted card is not readable property OnReaderWaiting : TPCSCReaderEvent fires when the reader is ready and waiting for a card property OnReaderListChange : TPCSCReaderEvent fires when the reader list has been updated property OnError : TPCSCErrorEvent TPCSCErrorEvent = procedure(Sender: TObject; ErrSource: TErrSource; ErrCode: cardinal) TErrSource = (esInit, esGetStatus, esConnect, esTransmit); fires when a error message is received while connecting to the card, reading the status word or transmitting data to the card Hints: -------------------------------------------------------- First, call INIT Then, set the reader you want to use Then, call OPEN or call OPEN in the On ReaderWaiting Event Then, if a card is inserted, you may call GetResponse... -------------------------------------------------------- A error 0x80100002 (The action was cancelled by an SCardCancel request) is normal behaviour when calling CLOSE --------------------------------------------------------

近期下载者

相关文件


收藏者