winscard.h header

This header is used by Security and Identity. For more information, see:

winscard.h contains the following programming interfaces:

Functions

 
GetOpenCardNameA

The GetOpenCardName function displays the smart card "select card" dialog box. (ANSI)
GetOpenCardNameW

The GetOpenCardName function displays the smart card "select card" dialog box. (Unicode)
SCardAccessStartedEvent

Returns an event handle when an event signals that the smart card resource manager is started.
SCardAddReaderToGroupA

Adds a reader to a reader group. (ANSI)
SCardAddReaderToGroupW

Adds a reader to a reader group. (Unicode)
SCardAudit

Writes event messages to the Windows application log Microsoft-Windows-SmartCard-Audit/Authentication.
SCardBeginTransaction

Starts a transaction.
SCardCancel

Terminates all outstanding actions within a specific resource manager context.
SCardConnectA

Establishes a connection (using a specific resource manager context) between the calling application and a smart card contained by a specific reader. If no card exists in the specified reader, an error is returned. (ANSI)
SCardConnectW

Establishes a connection (using a specific resource manager context) between the calling application and a smart card contained by a specific reader. If no card exists in the specified reader, an error is returned. (Unicode)
SCardControl

Gives you direct control of the reader. You can call it any time after a successful call to SCardConnect and before a successful call to SCardDisconnect.
SCardDisconnect

Terminates a connection previously opened between the calling application and a smart card in the target reader.
SCardEndTransaction

Completes a previously declared transaction, allowing other applications to resume interactions with the card.
SCardEstablishContext

Establishes the resource manager context (the scope) within which database operations are performed.
SCardForgetCardTypeA

Removes an introduced smart card from the smart card subsystem. (ANSI)
SCardForgetCardTypeW

Removes an introduced smart card from the smart card subsystem. (Unicode)
SCardForgetReaderA

Removes a previously introduced reader from control by the smart card subsystem. It is removed from the smart card database, including from any reader group that it may have been added to. (ANSI)
SCardForgetReaderGroupA

Removes a previously introduced smart card reader group from the smart card subsystem. Although this function automatically clears all readers from the group, it does not affect the existence of the individual readers in the database. (ANSI)
SCardForgetReaderGroupW

Removes a previously introduced smart card reader group from the smart card subsystem. Although this function automatically clears all readers from the group, it does not affect the existence of the individual readers in the database. (Unicode)
SCardForgetReaderW

Removes a previously introduced reader from control by the smart card subsystem. It is removed from the smart card database, including from any reader group that it may have been added to. (Unicode)
SCardFreeMemory

Releases memory that has been returned from the resource manager using the SCARD_AUTOALLOCATE length designator.
SCardGetAttrib

Retrieves the current reader attributes for the given handle. It does not affect the state of the reader, driver, or card.
SCardGetCardTypeProviderNameA

Returns the name of the module (dynamic link library) that contains the provider for a given card name and provider type. (ANSI)
SCardGetCardTypeProviderNameW

Returns the name of the module (dynamic link library) that contains the provider for a given card name and provider type. (Unicode)
SCardGetDeviceTypeIdA

Gets the device type identifier of the card reader for the given reader name. This function does not affect the state of the reader. (ANSI)
SCardGetDeviceTypeIdW

Gets the device type identifier of the card reader for the given reader name. This function does not affect the state of the reader. (Unicode)
SCardGetProviderIdA

Returns the identifier (GUID) of the primary service provider for a given card. (ANSI)
SCardGetProviderIdW

Returns the identifier (GUID) of the primary service provider for a given card. (Unicode)
SCardGetReaderDeviceInstanceIdA

Gets the device instance identifier of the card reader for the given reader name. This function does not affect the state of the reader. (ANSI)
SCardGetReaderDeviceInstanceIdW

Gets the device instance identifier of the card reader for the given reader name. This function does not affect the state of the reader. (Unicode)
SCardGetReaderIconA

Gets an icon of the smart card reader for a given reader's name. (ANSI)
SCardGetReaderIconW

Gets an icon of the smart card reader for a given reader's name. (Unicode)
SCardGetStatusChangeA

Blocks execution until the current availability of the cards in a specific set of readers changes. (ANSI)
SCardGetStatusChangeW

Blocks execution until the current availability of the cards in a specific set of readers changes. (Unicode)
SCardGetTransmitCount

Retrieves the number of transmit operations that have completed since the specified card reader was inserted.
SCardIntroduceCardTypeA

Introduces a smart card to the smart card subsystem (for the active user) by adding it to the smart card database. (ANSI)
SCardIntroduceCardTypeW

Introduces a smart card to the smart card subsystem (for the active user) by adding it to the smart card database. (Unicode)
SCardIntroduceReaderA

Introduces a new name for an existing smart card reader. (ANSI)
SCardIntroduceReaderGroupA

Introduces a reader group to the smart card subsystem. However, the reader group is not created until the group is specified when adding a reader to the smart card database. (ANSI)
SCardIntroduceReaderGroupW

Introduces a reader group to the smart card subsystem. However, the reader group is not created until the group is specified when adding a reader to the smart card database. (Unicode)
SCardIntroduceReaderW

Introduces a new name for an existing smart card reader. (Unicode)
SCardIsValidContext

Determines whether a smart card context handle is valid.
SCardListCardsA

Searches the smart card database and provides a list of named cards previously introduced to the system by the user. (ANSI)
SCardListCardsW

Searches the smart card database and provides a list of named cards previously introduced to the system by the user. (Unicode)
SCardListInterfacesA

Provides a list of interfaces supplied by a given card. (ANSI)
SCardListInterfacesW

Provides a list of interfaces supplied by a given card. (Unicode)
SCardListReaderGroupsA

Provides the list of reader groups that have previously been introduced to the system. (ANSI)
SCardListReaderGroupsW

Provides the list of reader groups that have previously been introduced to the system. (Unicode)
SCardListReadersA

Provides the list of readers within a set of named reader groups, eliminating duplicates. (ANSI)
SCardListReadersW

Provides the list of readers within a set of named reader groups, eliminating duplicates. (Unicode)
SCardListReadersWithDeviceInstanceIdA

Gets the list of readers that have provided a device instance identifier. This function does not affect the state of the reader. (ANSI)
SCardListReadersWithDeviceInstanceIdW

Gets the list of readers that have provided a device instance identifier. This function does not affect the state of the reader. (Unicode)
SCardLocateCardsA

Searches the readers listed in the rgReaderStates parameter for a card with an ATR string that matches one of the card names specified in mszCards, returning immediately with the result. (ANSI)
SCardLocateCardsByATRA

Searches the readers listed in the rgReaderStates parameter for a card with a name that matches one of the card names contained in one of the SCARD_ATRMASK structures specified by the rgAtrMasks parameter. (ANSI)
SCardLocateCardsByATRW

Searches the readers listed in the rgReaderStates parameter for a card with a name that matches one of the card names contained in one of the SCARD_ATRMASK structures specified by the rgAtrMasks parameter. (Unicode)
SCardLocateCardsW

Searches the readers listed in the rgReaderStates parameter for a card with an ATR string that matches one of the card names specified in mszCards, returning immediately with the result. (Unicode)
SCardReadCacheA

Retrieves the value portion of a name-value pair from the global cache maintained by the Smart Card Resource Manager. (ANSI)
SCardReadCacheW

Retrieves the value portion of a name-value pair from the global cache maintained by the Smart Card Resource Manager. (Unicode)
SCardReconnect

Reestablishes an existing connection between the calling application and a smart card.
SCardReleaseContext

Closes an established resource manager context, freeing any resources allocated under that context, including SCARDHANDLE objects and memory allocated using the SCARD_AUTOALLOCATE length designator.
SCardReleaseStartedEvent

Decrements the reference count for a handle acquired by a previous call to the SCardAccessStartedEvent function.
SCardRemoveReaderFromGroupA

Removes a reader from an existing reader group. This function has no effect on the reader. (ANSI)
SCardRemoveReaderFromGroupW

Removes a reader from an existing reader group. This function has no effect on the reader. (Unicode)
SCardSetAttrib

Sets the given reader attribute for the given handle.
SCardSetCardTypeProviderNameA

Specifies the name of the module (dynamic link library) containing the provider for a given card name and provider type. (ANSI)
SCardSetCardTypeProviderNameW

Specifies the name of the module (dynamic link library) containing the provider for a given card name and provider type. (Unicode)
SCardStatusA

Provides the current status of a smart card in a reader. (ANSI)
SCardStatusW

Provides the current status of a smart card in a reader. (Unicode)
SCardTransmit

Sends a service request to the smart card and expects to receive data back from the card.
SCardUIDlgSelectCardA

Displays the smart card Select Card dialog box. (ANSI)
SCardUIDlgSelectCardW

Displays the smart card Select Card dialog box. (Unicode)
SCardWriteCacheA

Writes a name-value pair from a smart card to the global cache maintained by the Smart Card Resource Manager. (ANSI)
SCardWriteCacheW

Writes a name-value pair from a smart card to the global cache maintained by the Smart Card Resource Manager. (Unicode)

Structures

 
OPENCARD_SEARCH_CRITERIAA

The OPENCARD_SEARCH_CRITERIA structure is used by the SCardUIDlgSelectCard function in order to recognize cards that meet the requirements set forth by the caller. You can, however, call SCardUIDlgSelectCard without using this structure. (ANSI)
OPENCARD_SEARCH_CRITERIAW

The OPENCARD_SEARCH_CRITERIA structure is used by the SCardUIDlgSelectCard function in order to recognize cards that meet the requirements set forth by the caller. You can, however, call SCardUIDlgSelectCard without using this structure. (Unicode)
OPENCARDNAME_EXA

The OPENCARDNAME_EX structure contains the information that the SCardUIDlgSelectCard function uses to initialize a smart card Select Card dialog box. (ANSI)
OPENCARDNAME_EXW

The OPENCARDNAME_EX structure contains the information that the SCardUIDlgSelectCard function uses to initialize a smart card Select Card dialog box. (Unicode)
OPENCARDNAMEA

Contains the information that the GetOpenCardName function uses to initialize a smart card Select Card dialog box. (ANSI)
OPENCARDNAMEW

Contains the information that the GetOpenCardName function uses to initialize a smart card Select Card dialog box. (Unicode)
SCARD_ATRMASK

Used by the SCardLocateCardsByATR function to locate cards.
SCARD_READERSTATEA

Used by functions for tracking smart cards within readers. (ANSI)
SCARD_READERSTATEW

Used by functions for tracking smart cards within readers. (Unicode)