Export (0) Print
Expand All
Expand Minimize

SCardAudit function

The SCardAudit function writes event messages to the Windows application log Microsoft-Windows-SmartCard-Audit/Authentication.

Syntax


LONG WINAPI SCardAudit(
  _In_  SCARDCONTEXT hContext,
  _In_  DWORD dwEvent
);

Parameters

hContext [in]

Handle that identifies the resource manager context. The resource manager context can be set by a previous call to the SCardEstablishContext function. This parameter cannot be NULL.

dwEvent [in]

The event to log.

ValueMeaning
SCARD_AUDIT_CHV_FAILURE
0x0

A smart card holder verification (CHV) attempt failed.

SCARD_AUDIT_CHV_SUCCESS
0x1

A smart card holder verification (CHV) attempt succeeded.

 

Return value

This function returns different values depending on whether it succeeds or fails.

Return codeDescription
Success

SCARD_S_SUCCESS.

Failure

An error code. For more information, see Smart Card Return Values.

 

Remarks

This function is not redirected. An application calling the SCardAudit function from within a Remote Desktop session will log the event on the remote system.

Examples


// hContext was set by a previous call to SCardEstablishContext.
lReturn = SCardAudit (hContext,
                      SCARD_AUDIT_CHV_SUCCESS);

if ( SCARD_S_SUCCESS != lReturn )
{
    printf("Failed SCardAudit - %x\n", lReturn);
    // Take appropriate action
}


Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Winscard.h

Library

Winscard.lib

DLL

Winscard.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft