Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function introduces a smart card to the smart card subsystem for the active user by adding it to the smart card database.

Syntax

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

Parameters

hContext

[in] Handle to the resource manager context. The resource manager context is set by a previous call to SCardEstablishContext.

szCardName

[in] Null-terminated string that contains the name by which a user can recognize the card.

pguidPrimaryProvider

[in] Pointer to the globally unique identifier (GUID) for the primary service provider of the smart card.

rgguidInterfaces

[in] Supplies an array of GUIDs that identify the interfaces supported by the smart card.

dwInterfaceCount

[in] Specifies the number of identifiers in the rgguidInterfacesarray.

pbAtr

[in] Pointer to an Automatic Terminal Recognition (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 standard ATR parsing.

pbAtrMask

[in] Pointer to an optional bit mask 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 specified ATR string A is compared to the ATR supplied in pbAtr, it matches if and only if A & M = pbAtr, where Mis the supplied mask and &represents bitwise logical AND.

cbAtrLen

[in] Count of bytes that represent the length of the ATR and optional ATR mask. If this value is 0, then the length of the ATR is determined by standard ATR parsing.

Return Value

The following table shows the possible return values.

Value Description

SCARD_S_SUCCESS

Succeeds

An error value (see Smart Card Error Valuesfor a list of all error values).

Fails

Remarks

SCardIntroduceCardTypeis a database management function.

To remove a smart card, see SCardForgetCardType.

Requirements

Header winscard.h
Library winscard.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also