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. |
This function returns the name of the DLL containing the provider for a given card name and provider type.
Syntax
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 SCardGetCardTypeProviderNameis 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, pcchProvidersupplies the length of the szProviderbuffer in characters. If this value is SCARD_AUTOALLOCATE, szProvideris converted to a pointer to a byte pointer and receives the address of a block of memory containing the string. This block of memory must be deallocated by calling SCardFreeMemory.
On output, this value represents the actual number of characters, including the null terminator, in the szProvidervariable.
Return Value
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 Valuesfor a list of all error values). |
Fails |
Remarks
Upon successful completion of this function, the value in szProvidercan be used as the third parameter in a call to CryptAcquireContext.
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 |