Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
26c72e91
Commit
26c72e91
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 SCardTransmit().
parent
094161f3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
1 deletion
+64
-1
unixlib.c
dlls/winscard/unixlib.c
+9
-0
unixlib.h
dlls/winscard/unixlib.h
+18
-0
winscard.c
dlls/winscard/winscard.c
+36
-0
winscard.spec
dlls/winscard/winscard.spec
+1
-1
No files found.
dlls/winscard/unixlib.c
View file @
26c72e91
...
...
@@ -44,6 +44,7 @@ LONG SCardDisconnect( UINT64, UINT64 );
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
*
);
static
NTSTATUS
scard_establish_context
(
void
*
args
)
{
...
...
@@ -126,6 +127,13 @@ static NTSTATUS scard_end_transaction( void *args )
return
SCardEndTransaction
(
params
->
handle
,
params
->
disposition
);
}
static
NTSTATUS
scard_transmit
(
void
*
args
)
{
struct
scard_transmit_params
*
params
=
args
;
return
SCardTransmit
(
params
->
handle
,
params
->
send
,
params
->
send_buf
,
params
->
send_buflen
,
params
->
recv
,
params
->
recv_buf
,
params
->
recv_buflen
);
}
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
scard_establish_context
,
...
...
@@ -141,4 +149,5 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
scard_disconnect
,
scard_begin_transaction
,
scard_end_transaction
,
scard_transmit
,
};
dlls/winscard/unixlib.h
View file @
26c72e91
...
...
@@ -121,6 +121,23 @@ struct scard_end_transaction_params
UINT64
disposition
;
};
struct
io_request
{
UINT64
protocol
;
UINT64
pci_len
;
};
struct
scard_transmit_params
{
UINT64
handle
;
const
struct
io_request
*
send
;
const
BYTE
*
send_buf
;
UINT64
send_buflen
;
struct
io_request
*
recv
;
BYTE
*
recv_buf
;
UINT64
*
recv_buflen
;
};
enum
winscard_funcs
{
unix_scard_establish_context
,
...
...
@@ -136,4 +153,5 @@ enum winscard_funcs
unix_scard_disconnect
,
unix_scard_begin_transaction
,
unix_scard_end_transaction
,
unix_scard_transmit
,
};
dlls/winscard/winscard.c
View file @
26c72e91
...
...
@@ -786,6 +786,42 @@ LONG WINAPI SCardEndTransaction( SCARDHANDLE connect, DWORD disposition )
return
ret
;
}
LONG
WINAPI
SCardTransmit
(
SCARDHANDLE
connect
,
const
SCARD_IO_REQUEST
*
send
,
const
BYTE
*
send_buf
,
DWORD
send_buflen
,
SCARD_IO_REQUEST
*
recv
,
BYTE
*
recv_buf
,
DWORD
*
recv_buflen
)
{
struct
handle
*
handle
=
(
struct
handle
*
)
connect
;
struct
scard_transmit_params
params
;
struct
io_request
send64
=
{
send
->
dwProtocol
,
send
->
cbPciLength
},
recv64
;
UINT64
recv_buflen64
;
LONG
ret
;
TRACE
(
"%Ix, %p, %p, %lu, %p, %p, %p
\n
"
,
connect
,
send
,
send_buf
,
send_buflen
,
recv
,
recv_buf
,
recv_buflen
);
if
(
!
handle
||
handle
->
magic
!=
CONNECT_MAGIC
)
return
ERROR_INVALID_HANDLE
;
if
(
!
recv_buflen
)
return
SCARD_E_INVALID_PARAMETER
;
params
.
handle
=
handle
->
unix_handle
;
params
.
send
=
&
send64
;
params
.
send_buf
=
send_buf
;
params
.
send_buflen
=
send_buflen
;
params
.
recv
=
&
recv64
;
params
.
recv_buf
=
recv_buf
;
recv_buflen64
=
*
recv_buflen
;
params
.
recv_buflen
=
&
recv_buflen64
;
if
(
!
(
ret
=
UNIX_CALL
(
scard_transmit
,
&
params
)))
{
if
(
recv
)
{
recv
->
dwProtocol
=
recv64
.
protocol
;
recv
->
cbPciLength
=
recv64
.
pci_len
;
}
*
recv_buflen
=
recv_buflen64
;
}
TRACE
(
"returning %#lx
\n
"
,
ret
);
return
ret
;
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
void
*
reserved
)
{
switch
(
reason
)
...
...
dlls/winscard/winscard.spec
View file @
26c72e91
...
...
@@ -57,7 +57,7 @@
@ stub SCardState
@ stdcall SCardStatusA(long str ptr ptr ptr ptr ptr)
@ stdcall SCardStatusW(long wstr ptr ptr ptr ptr ptr)
@ st
ub SCardTransmit
@ st
dcall SCardTransmit(long ptr ptr long ptr ptr ptr)
@ extern g_rgSCardRawPci
@ extern g_rgSCardT0Pci
@ extern g_rgSCardT1Pci
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