Share via


SCardGetProviderId

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

SCardEstablishContext
SCardListCards
SCardListInterfaces
SCardListReaders