Share via


SCardEstablishContext (Windows Embedded CE 6.0)

1/6/2010

This function establishes the resource manager context (the scope) within which database operations are performed.

Syntax

LONG SCardEstablishContext(
  DWORD dwScope, 
  LPCVOID pvReserved1, 
  LPCVOID pvReserved2, 
  LPSCARDCONTEXT phContext 
);

Parameters

  • dwScope
    [in] Specifies the scope of the resource manager context. The following table shows the possible values for dwScope.

    Value Description

    SCARD_SCOPE_SYSTEM

    Database operations are performed within the domain of the system. The calling application must have appropriate access permissions for any database actions.

    SCARD_SCOPE_USER

    Unsupported. If specified, Windows Embedded CE assumes the SCARD_SCOPE_SYSTEM value.

  • pvReserved1
    [in] Void pointer reserved for future use; must be NULL. Reserved to enable a suitably privileged management application to act on behalf of another user.
  • pvReserved2
    [in] Void pointer reserved for future use; must be NULL. Reserved to enable a suitably privileged management application to act on behalf of another terminal.
  • phContext
    [out] Pointer to a handle to the established resource manager context. This handle can now be supplied to other functions attempting to do work within this context.

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

The context handle returned by SCardEstablishContext can be used by database query and management functions.

To free an established resource manager context, see SCardReleaseContext.

Requirements

Header winscard.h
Library winscard.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Smart Card Functions
SCardReleaseContext