SCardGetDeviceTypeIdA function (winscard.h)

The SCardGetDeviceTypeId function gets the device type identifier of the card reader for the given reader name. This function does not affect the state of the reader.

Syntax

LONG SCardGetDeviceTypeIdA(
  [in]      SCARDCONTEXT hContext,
  [in]      LPCSTR       szReaderName,
  [in, out] LPDWORD      pdwDeviceTypeId
);

Parameters

[in] hContext

Handle that identifies the resource manager context for the query. You can set the resource manager context by calling the SCardEstablishContext function. This parameter cannot be NULL.

[in] szReaderName

Reader name. You can get this value by calling the SCardListReaders function.

[in, out] pdwDeviceTypeId

The actual device type identifier. The list of reader types returned by this function are listed under ReaderType member in the SCARD_READER_CAPABILITIES structure.

Return value

This function returns different values depending on whether it succeeds or fails.

Return code Description
Success
SCARD_S_SUCCESS.
Failure
An error code. For more information, see Smart Card Return Values.

Remarks

Note

The winscard.h header defines SCardGetDeviceTypeId as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header winscard.h
DLL Winscard.dll