Compartilhar via


SCardEstablishContext (Windows CE 5.0)

Send Feedback

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

LONG SCardEstablishContext(DWORDdwScope, LPCVOIDpvReserved1, LPCVOIDpvReserved2, LPSCARDCONTEXTphContext);

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 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 Values

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

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

See Also

SCardReleaseContext

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.