SmartCard.Status
----------------

Queries current status of smart card in reader.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SmartCard](component_SmartCard.md) | [6.3](newinversion63.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

MBS( "SmartCard.Status"; SmartCardContext; Selector ) 

**MBS**( **"SmartCard.Status";** /\* Queries current status of smart card in reader. \*/  
**$SmartCardContext**; /\* The smartcard context reference number. \*/   
**$Selector**) /\* Which value to query.  
Can be ReaderName, State, Protocol or ATR.e.g. "State" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SmartCardContext | The smartcard context reference number. | $SmartCardContext |
| Selector | Which value to query.   Can be ReaderName, State, Protocol or ATR. | "State" |

### Result

Returns value or error.

### Description

Queries current status of smart card in reader.  
You can call it any time after a successful call to [SmartCard.Connect](SmartCardConnect.md) and before a successful call to [SmartCard.Disconnect](SmartCardDisconnect.md). It does not affect the state of the reader or reader driver.  
  
If you ask for State, the result is Absent, Present, Swallowed, Powered, Negotiable or Specific.  
### Examples

Query reader name:

 MBS ( "SmartCard.Status"; $SmartCardContext ; "ReaderName" )  
### See also

- [SmartCard.Connect](SmartCardConnect.md)
- [SmartCard.Disconnect](SmartCardDisconnect.md)

### Example Databases

- [SmartCard/SmartCard ReadFile](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/SmartCard%20ReadFile.shtml#3ScriptAnchor_)
- [SmartCard/SmartCard Signatures](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/SmartCard%20Signatures.shtml#3ScriptAnchor_)

This function checks for a license.

Created 13th June 2016 , last changed 18th June 2016

  
[SmartCard.SplitValues](SmartCardSplitValues.md) - [SmartCard.Transmit](SmartCardTransmit.md)

[HTML Version](SmartCardStatus.shtml)