SCardIntroduceCardType

The SCardIntroduceCardType function introduces a smart card to the smart card subsystem (for the active user) by adding it to the smart card database.

LONG SCardIntroduceCardType(
  IN SCARDCONTEXT hContext,
  IN LPCTSTR szCardName,
  IN LPGUID pguidPrimaryProvider,
  IN LPGUID rgguidInterfaces,
  IN DWORD dwInterfaceCount,
  IN LPCBYTE pbAtr,
  IN LPCBYTE pbAtrMask,
  IN DWORD cbAtrLen
);
 

Parameters

hContext
Supplies the handle that identifies the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext.
szCardName
Supplies the name by which the user can recognize the card.
pguidPrimaryProvider
Points to the identifier (GUID) for the smart card's primary service provider.
rgguidInterfaces
Supplies an array of identifiers (GUIDs) that identify the interfaces supported by the smart card.
dwInterfaceCount
Supplies the number of identifiers in the rgguidInterfaces array.
pbAtr
Supplies an ATR string that can be used for matching purposes when querying the smart card database (see SCardListCards). The length of this string is determined by normal ATR parsing.
pbAtrMask
Supplies an optional bitmask to use when comparing the ATRs of smart cards to the ATR supplied in pbAtr. If this value is non-NULL, it must point to a string of bytes the same length as the ATR string supplied in pbAtr. When a given ATR string 'A' is compared to the ATR supplied in pbAtr, it matches if and only if A & M = pbAtr, where M is the supplied mask, and & represents bitwise logical AND.
cbAtrLen
Supplies the length of the ATR and optional ATR Mask. If this value is zero, then the length of the ATR is determined by normal ATR parsing

Return Values

If the function… The return value is…
Succeeds SCARD_S_SUCCESS.
Fails An error code (see Error Codes for a list of all error codes).

Remarks

SCardIntroduceCardType is a database management function. For a description of other database management functions, see Smart Card Database Management Functions.

To remove a smart card, see SCardForgetCardType.

QuickInfo

  Windows NT: Use version 4.0 SP3 and later.
  Windows: Use Windows 95 OSR2.1.
  Windows CE: Unsupported.
  Header: Declared in winscard.h.
  Import Library: Link with winscard.lib.

See Also

SCardEstablishContext, SCardForgetCardType, SCardIntroduceReader, SCardIntroduceReaderGroup, SCardListCards