Share via


SCardIntroduceCardType (Windows Embedded CE 6.0)

1/6/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 rgguidInterfaces array.
  • 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 M is 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 Values for a list of all error values).

Fails

Remarks

SCardIntroduceCardType is 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

See Also

Reference

Smart Card Functions
SCardEstablishContext
SCardForgetCardType
SCardIntroduceReader
SCardListCards