Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The SCardAudit function writes event messages to the Windows application log Microsoft-Windows-SmartCard-Audit/Authentication.
Syntax
LONG SCardAudit(
[in] SCARDCONTEXT hContext,
[in] DWORD dwEvent
);
Parameters
[in] hContext
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.
[in] dwEvent
The event to log.
Value | Meaning |
---|---|
|
A smart card holder verification (CHV) attempt failed. |
|
A smart card holder verification (CHV) attempt succeeded. |
Return value
This function returns different values depending on whether it succeeds or fails.
Return code | Description |
---|---|
|
SCARD_S_SUCCESS. |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | winscard.h |
Library | Winscard.lib |
DLL | Winscard.dll |