SCardGetProviderId (Compact 7)

3/12/2014

This function returns the globally unique identifier (GUID) of the primary service provider for a specified card.

The caller supplies the name of a smart card, previously introduced to the system, and receives the registered identifier of the primary service provider GUID, if one exists.

Syntax

LONG SCardGetProviderId(
  SCARDCONTEXT hContext, 
  LPCTSTR szCard, 
  LPGUID pguidProviderId 
);

Parameters

  • hContext
    [in] Handle that identifies the resource manager context for the query. The resource manager context can be set by a previous call to SCardEstablishContext or set to NULL if the query is not directed toward a specific context.
  • szCard
    [in] Null-terminated string that contains the name of the card defined to the system.
  • pguidProviderId
    [out] Pointer to a globally unique identifier (GUID) of the primary service provider. This provider can be activated by means of COM and supplies access to other services in the card.

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

SCardGetProviderId is a database query function.

Requirements

Header

winscard.h

Library

winscard.lib

See Also

Reference

Smart Card Functions
SCardEstablishContext
SCardListCards
SCardListInterfaces
SCardListReaders