Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c53a2044
Commit
c53a2044
authored
Feb 16, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winscard: Implement SCardControl().
parent
26c72e91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
1 deletion
+47
-1
unixlib.c
dlls/winscard/unixlib.c
+9
-0
unixlib.h
dlls/winscard/unixlib.h
+12
-0
winscard.c
dlls/winscard/winscard.c
+25
-0
winscard.spec
dlls/winscard/winscard.spec
+1
-1
No files found.
dlls/winscard/unixlib.c
View file @
c53a2044
...
...
@@ -45,6 +45,7 @@ LONG SCardReconnect( UINT64, UINT64, UINT64, UINT64, UINT64 * );
LONG
SCardBeginTransaction
(
UINT64
);
LONG
SCardEndTransaction
(
UINT64
,
UINT64
);
LONG
SCardTransmit
(
UINT64
,
const
struct
io_request
*
,
const
BYTE
*
,
UINT64
,
struct
io_request
*
,
BYTE
*
,
UINT64
*
);
LONG
SCardControl
(
UINT64
,
UINT64
,
const
void
*
,
UINT64
,
void
*
,
UINT64
,
UINT64
*
);
static
NTSTATUS
scard_establish_context
(
void
*
args
)
{
...
...
@@ -134,6 +135,13 @@ static NTSTATUS scard_transmit( void *args )
params
->
recv_buf
,
params
->
recv_buflen
);
}
static
NTSTATUS
scard_control
(
void
*
args
)
{
struct
scard_control_params
*
params
=
args
;
return
SCardControl
(
params
->
handle
,
params
->
code
,
params
->
in_buf
,
params
->
in_buflen
,
params
->
out_buf
,
params
->
out_buflen
,
params
->
ret_len
);
}
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
scard_establish_context
,
...
...
@@ -150,4 +158,5 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
scard_begin_transaction
,
scard_end_transaction
,
scard_transmit
,
scard_control
,
};
dlls/winscard/unixlib.h
View file @
c53a2044
...
...
@@ -138,6 +138,17 @@ struct scard_transmit_params
UINT64
*
recv_buflen
;
};
struct
scard_control_params
{
UINT64
handle
;
UINT64
code
;
const
void
*
in_buf
;
UINT64
in_buflen
;
void
*
out_buf
;
UINT64
out_buflen
;
UINT64
*
ret_len
;
};
enum
winscard_funcs
{
unix_scard_establish_context
,
...
...
@@ -154,4 +165,5 @@ enum winscard_funcs
unix_scard_begin_transaction
,
unix_scard_end_transaction
,
unix_scard_transmit
,
unix_scard_control
,
};
dlls/winscard/winscard.c
View file @
c53a2044
...
...
@@ -822,6 +822,31 @@ LONG WINAPI SCardTransmit( SCARDHANDLE connect, const SCARD_IO_REQUEST *send, co
return
ret
;
}
LONG
WINAPI
SCardControl
(
SCARDHANDLE
connect
,
DWORD
code
,
const
void
*
in_buf
,
DWORD
in_buflen
,
void
*
out_buf
,
DWORD
out_buflen
,
DWORD
*
ret_len
)
{
struct
handle
*
handle
=
(
struct
handle
*
)
connect
;
struct
scard_control_params
params
;
UINT64
ret_len64
;
LONG
ret
;
TRACE
(
"%Ix, %#lx, %p, %lu, %p, %lu, %p
\n
"
,
connect
,
code
,
in_buf
,
in_buflen
,
out_buf
,
out_buflen
,
ret_len
);
if
(
!
handle
||
handle
->
magic
!=
CONNECT_MAGIC
)
return
ERROR_INVALID_HANDLE
;
if
(
!
ret_len
)
return
SCARD_E_INVALID_PARAMETER
;
params
.
handle
=
handle
->
unix_handle
;
params
.
code
=
code
;
params
.
in_buf
=
in_buf
;
params
.
in_buflen
=
in_buflen
;
params
.
out_buf
=
out_buf
;
params
.
out_buflen
=
out_buflen
;
params
.
ret_len
=
&
ret_len64
;
if
(
!
(
ret
=
UNIX_CALL
(
scard_control
,
&
params
)))
*
ret_len
=
ret_len64
;
TRACE
(
"returning %#lx
\n
"
,
ret
);
return
ret
;
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
void
*
reserved
)
{
switch
(
reason
)
...
...
dlls/winscard/winscard.spec
View file @
c53a2044
...
...
@@ -9,7 +9,7 @@
@ stdcall SCardCancel(long)
@ stdcall SCardConnectA(long str long long ptr ptr)
@ stdcall SCardConnectW(long wstr long long ptr ptr)
@ st
ub SCardControl
@ st
dcall SCardControl(long long ptr long ptr long ptr)
@ stdcall SCardDisconnect(long long)
@ stdcall SCardEndTransaction(long long)
@ stdcall SCardEstablishContext(long ptr ptr ptr)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment