Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to SmartCardMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The function waits for the completion of all other transactions before it begins. After the transaction starts, all other applications are blocked from accessing the smart card while the transaction is in progress.
If a transaction is held on the card for more than five seconds with no operations happening on that card, then the card is reset. Calling any of the Smart Card and Reader Access Functions or Direct Card Access Functions on the card that is transacted results in the timer being reset to continue allowing the transaction to be used.
The BeginTransaction function is a smart card and reader access function. For more information about other access functions, see Smart Card and Reader Access Functions.
Lasterror is set.
SmartCardMBS.CancelTransaction
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Lasterror is set.
SmartCardMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
SmartCardMBS.Control(ControlCode as Integer, input as ptr, inputLength as UInt32, output as ptr, byref outputLength as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
You can call it any time after a successful call to SmartCard.Connect and before a successful call to SmartCard.Disconnect. The effect on the state of the reader depends on the control code.
ControlCode: Control code for the operation. This value identifies the specific operation to be performed. |
SmartCardMBS.Disconnect(Disposition as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Disposition: Action to take on the card in the connected reader on close.
can be:
kUnpowerCard | Power down the card and reset it (Cold Reset). |
kResetCard | Reset the card (Warm Reset). |
kLeaveCard | Do not do anything special on reconnect. |
kEjectCard | Eject card. |
SmartCardMBS.EndTransaction(Disposition as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Completes a previously declared transaction, allowing other applications to resume interactions with the card.
Disposition: Action to take on the card in the connected reader on close. Can be Eject, Leave, Reset or Unpower. See constants.
Lasterror is set.
SmartCardMBS.GetAttrib(AttrId as UInt32) as Memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
It does not affect the state of the reader, driver, or card.
The plugin first queries for size of attribute and on success queries again to get the data and return it as a memoryblock.
AttrId: The attribute ID. See kAttribute* constants.
Lasterror is set.
SmartCardMBS.ReadFile(FileID as MemoryBlock) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 18.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns data as MemoryBlock or error message.
The first two bytes are status code.
For Swiss health cards, the relevant IDs are 2F06 and 2F07.
For Belgian EID:
4031 | ID RN |
4032 | SGN RN |
4033 | ID Address |
4034 | SGN Address |
4035 | ID Photo |
SmartCardMBS.Reconnect(ShareMode as UInt32, PreferredProtocols as UInt32, Initialization as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
This function moves a card handle from direct access to general access, or acknowledges and clears an error condition that is preventing further access to the card.
Initialization can be one of the following:
kUnpowerCard | Power down the card and reset it (Cold Reset). |
kResetCard | Reset the card (Warm Reset). |
kLeaveCard | Do not do anything special on reconnect. |
SmartCardMBS.SetAttrib(AttrId as UInt32, mem as Memoryblock)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
It does not affect the state of the reader, reader driver, or smart card. Not all attributes are supported by all readers (nor can they be set at all times) as many of the attributes are under direct control of the transport protocol.
AttrId: The attribute ID. See kAttribute* constants.
Mem: The data to store.
Lasterror is set.
SmartCardMBS.Status(byref Reader as string, byref State as Integer, byref Protocol as Integer, byref CardID as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
You can call it any time after a successful call to SCardConnect and before a successful call to SCardDisconnect. It does not affect the state of the reader or reader driver.
Provides reader name, state of card (see kState constants), Protocol (see kProtocol constants) and CardID.
State: Current state of the smart card in the reader. Upon success, it receives one of the following state indicators.
Protocol: Current protocol, if any. The returned value is meaningful only if the returned value of pdwState is kCardStateSpecific.
CardID: 32-byte buffer that receives the ATR string from the currently inserted card, if available.
Lasterror is set.
See also:
SmartCardMBS.Status(byref State as Integer, byref Protocol as Integer, byref CardID as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Same as other Status function, but without querying the name.
Lasterror is set.
See also:
SmartCardMBS.Transmit(ioSendPci as Ptr, SendBuffer as ptr, SendLength as UInt32, ioRecvPci as ptr, RecvBuffer as Ptr, byref RecvLength as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Tools Plugin | 16.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
ioSendPci:
A pointer to the protocol header structure for the instruction. This buffer is in the format of an SCARD_IO_REQUEST structure, followed by the specific protocol control information (PCI).
For the T=0, T=1, and Raw protocols, the PCI structure is constant. The smart card subsystem supplies a global T=0, T=1, or Raw PCI structure, which you can reference by using the symbols SCARD_PCI_T0, SCARD_PCI_T1, and SCARD_PCI_RAW respectively.
SendBuffer:
A pointer to the actual data to be written to the card.
For T=0, the data parameters are placed into the address pointed to by SendBuffer according to the following structure:
Type | name | Description |
Byte | Cla | The instruction class |
Byte | Ins | The instruction code |
Byte | P1 | Parameter to the instruction |
Byte | P2 | Parameter to the instruction |
Byte | P3 | Size of I/O transfer |
The items on this page are in the following plugins: MBS Tools Plugin.