PC/SC Guide
Prox–DU & Prox–SU
www.gemalto.com
DOC119811A Public Use Page 35/129
SCardIntroduceReader Function
The SCardIntroduceReader function introduces a new name for an existing smart card
reader.
Note Smart card readers are automatically introduced to the system; a smart card reader
vendor's setup program can also introduce a smart card reader to the system.
Syntax:
LONG WINAPI SCardIntroduceReader(
__in SCARDCONTEXT hContext,
__in LPCTSTR szReaderName,
__in LPCTSTR szDeviceName
);
Parameters:
hContext [in]
Handle that identifies the resource manager context. The resource manager context
is set by a previous call to SCardEstablishContext. This parameter cannot be NULL.
szReaderName [in]
Display name to be assigned to the reader.
szDeviceName [in]
System name of the smart card reader, for example, "MyReader 01".
Return Value:
This function returns different values depending on whether it succeeds or fails:
Success: SCARD_S_SUCCESS.
Failure: An error code. For more information, see Smart Card Return Values.
Remarks:
All readers installed on the system are automatically introduced by their system name.
Typically, SCardIntroduceReader is called only to change the name of an existing reader.
The SCardIntroduceReader function is a database management function. For more
information on other database management functions, see Smart Card Database
Management Functions.
To remove a reader, use SCardForgetReader.
Examples:
The following example shows introducing a smart card reader.
// This example renames the reader name.
// This is a two-step process (first add the new
// name, then forget the old name).
LPBYTE pbAttr = NULL;
DWORD cByte = SCARD_AUTOALLOCATE;
LONG lReturn;
// Step 1: Add the new reader name.
// The device name attribute is a necessary value.