Commit 4295b90c authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winscard: Implement SCardCancel().

parent 3f325721
......@@ -35,6 +35,7 @@ LONG SCardEstablishContext( UINT64, const void *, const void *, UINT64 * );
LONG SCardReleaseContext( UINT64 );
LONG SCardIsValidContext( UINT64 );
LONG SCardGetStatusChange( UINT64, UINT64, struct reader_state *, UINT64 );
LONG SCardCancel( UINT64 );
static NTSTATUS scard_establish_context( void *args )
{
......@@ -60,10 +61,17 @@ static NTSTATUS scard_get_status_change( void *args )
return SCardGetStatusChange( params->handle, params->timeout, params->states, params->count );
}
static NTSTATUS scard_cancel( void *args )
{
struct scard_cancel_params *params = args;
return SCardCancel( params->handle );
}
const unixlib_entry_t __wine_unix_call_funcs[] =
{
scard_establish_context,
scard_release_context,
scard_is_valid_context,
scard_get_status_change,
scard_cancel,
};
......@@ -54,10 +54,16 @@ struct scard_get_status_change_params
UINT64 count;
};
struct scard_cancel_params
{
UINT64 handle;
};
enum winscard_funcs
{
unix_scard_establish_context,
unix_scard_release_context,
unix_scard_is_valid_context,
unix_scard_get_status_change,
unix_scard_cancel,
};
......@@ -201,11 +201,20 @@ LONG WINAPI SCardListReadersW(SCARDCONTEXT context, const WCHAR *groups, WCHAR *
return SCARD_E_NO_READERS_AVAILABLE;
}
LONG WINAPI SCardCancel(SCARDCONTEXT context)
LONG WINAPI SCardCancel( SCARDCONTEXT context )
{
FIXME("(%Ix) stub\n", context);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return SCARD_F_INTERNAL_ERROR;
struct handle *handle = (struct handle *)context;
struct scard_cancel_params params;
LONG ret;
TRACE( "%Ix\n", context );
if (!handle || handle->magic != CONTEXT_MAGIC) return ERROR_INVALID_HANDLE;
params.handle = handle->unix_handle;
ret = UNIX_CALL( scard_cancel, &params );
TRACE( "returning %#lx\n", ret );
return ret;
}
static LONG map_states_inA( const SCARD_READERSTATEA *src, struct reader_state *dst, DWORD count )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment