CardDeauthenticate function

The CardDeauthenticate function is an optional export that should be implemented within the card minidriver, if possible, to efficiently reverse the effect of authenticating a user or administrator without resetting the card.

If this function is not implemented, then when you develop your minidriver you must set the pfnCardDeauthenticate parameter in the CARD_DATA structure to NULL.

The Base CSP/KSP tests this pointer for NULL before calling it. If the value is NULL, the Base CSP/KSP de-authenticates a user by resetting the card. Because a card reset is a time-consuming operation, it is strongly recommended that you implement this function.

Syntax

DWORD WINAPI CardDeauthenticate(
  _In_ PCARD_DATA pCardData,
  _In_ LPWSTR     pwszUserId,
  _In_ DWORD      dwFlags
);

Parameters

  • pCardData [in]
    Context information for the call. For more information, see CardAcquireContext.

  • pwszUserId [in]
    String that indicates the card principal to be deauthenticated.

  • dwFlags [in]
    Reserved. Set to 0.

Return value

Zero on success; otherwise, nonzero.

Remarks

A card principal is the user type (or role) that is associated with the authentication process that the smart card uses. For more information about the various types of card principals, see ”Known Principals” section of File System Requirements.

If the card minidriver returns a nonzero value from this function, the Base CSP/KSP resets the card.

After successfully de-authenticating the user, the minidriver should clear any cache content that it may have created during the duration of the authenticated session using the call back caching functions set by Smart card Base CSP/SC KSP.

Requirements

Target platform

Desktop

Header

Cardmod.h (include Cardmod.h)

 

 

Send comments about this topic to Microsoft