Commit 9d40ac46 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winscard: Implement SCardIsValidContext().

parent 8490c43f
......@@ -33,6 +33,7 @@
LONG SCardEstablishContext( UINT64, const void *, const void *, UINT64 * );
LONG SCardReleaseContext( UINT64 );
LONG SCardIsValidContext( UINT64 );
static NTSTATUS scard_establish_context( void *args )
{
......@@ -46,8 +47,15 @@ static NTSTATUS scard_release_context( void *args )
return SCardReleaseContext( params->handle );
}
static NTSTATUS scard_is_valid_context( void *args )
{
struct scard_is_valid_context_params *params = args;
return SCardIsValidContext( params->handle );
}
const unixlib_entry_t __wine_unix_call_funcs[] =
{
scard_establish_context,
scard_release_context,
scard_is_valid_context,
};
......@@ -30,8 +30,14 @@ struct scard_release_context_params
UINT64 handle;
};
struct scard_is_valid_context_params
{
UINT64 handle;
};
enum winscard_funcs
{
unix_scard_establish_context,
unix_scard_release_context,
unix_scard_is_valid_context,
};
......@@ -94,11 +94,20 @@ LONG WINAPI SCardEstablishContext( DWORD scope, const void *reserved1, const voi
return ret;
}
LONG WINAPI SCardIsValidContext(SCARDCONTEXT context)
LONG WINAPI SCardIsValidContext( 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_is_valid_context_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_is_valid_context, &params );
TRACE( "returning %#lx\n", ret );
return ret;
}
LONG WINAPI SCardListCardsA(SCARDCONTEXT hContext, LPCBYTE pbAtr, LPCGUID rgguidInterfaces, DWORD cguidInterfaceCount, LPSTR mszCards, LPDWORD pcchCards)
......
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