SCardGetCardTypeProviderName

This function returns the name of the module (dynamic link library) containing the provider for a given card name and provider type.

LONG SCardGetCardTypeProviderName(
  SCARDCONTEXT hContext,
  LPCTSTR szCardName,
  DWORD dwProviderId,
  LPTSTR szProvider,
  LPDWORD pcchProvider 
);

Parameters

  • hContext
    [in] Supplies the handle that identifies the resource manager context. The resource manager context can be set by a previous call to SCardEstablishContext. This value can be NULL if the call to SCardGetCardTypeProviderName is not directed to a specific context.
  • szCardName
    [in] Supplies the name of the card type with which this provider name is associated.
  • dwProviderId
    [in] Supplies the identifier for the provider associated with this card type. The following table shows the possible values provided for dwProviderId.
    Value Description
    SCARD_PROVIDER_PRIMARY The function retrieves the name of the primary smart card service provider as a GUID string.
    SCARD_PROVIDER_CSP The function retrieves the name of the cryptographic service provider.
  • szProvider
    [out] String variable that contains the retrieved provider name upon successful completion of this function.
  • pcchProvider
    [in, out] Pointer to DWORD value. On input, *pcchProvider supplies the length of the szProvider buffer in characters. If this value is SCARD_AUTOALLOCATE, then szProvider is converted to a pointer to a string pointer and receives the address of a block of memory containing the string. On output, this value represents the actual number of characters, including the null terminator, in the szProvider variable.

Return Values

This function returns different values depending on whether it succeeds or fails. 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

Upon successful completion of this function, the value in szProvider can be used as the third parameter in a call to CryptAcquireContext.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Winscard.h.
Link Library: Winscard.lib.

See Also

CryptAcquireContext | SCardSetCardTypeProviderName

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.