/* [size_is] */ BYTE pbHandle[8];
} REDIR_SCARDHANDLE;
-typedef struct _Long_Call
-{
- LONG LongValue;
-} Long_Call;
-
typedef struct _Long_Return
{
LONG ReturnCode;
typedef struct _longAndMultiString_Return ListReaders_Return;
-typedef struct _Context_Call
+
+typedef struct _EstablishContext_Return
{
+ LONG ReturnCode;
REDIR_SCARDCONTEXT hContext;
-} Context_Call;
+} EstablishContext_Return;
-typedef struct _ContextAndStringA_Call
+typedef struct _ReaderState_Return
{
- REDIR_SCARDCONTEXT hContext;
- /* [string] */ char* sz;
-} ContextAndStringA_Call;
+ DWORD dwCurrentState;
+ DWORD dwEventState;
+ /* [range] */ DWORD cbAtr;
+ BYTE rgbAtr[36];
+} ReaderState_Return;
-typedef struct _ContextAndStringW_Call
+typedef struct _LocateCards_ATRMask
{
- REDIR_SCARDCONTEXT hContext;
- /* [string] */ WCHAR* sz;
-} ContextAndStringW_Call;
+ /* [range] */ DWORD cbAtr;
+ BYTE rgbAtr[36];
+ BYTE rgbMask[36];
+} LocateCards_ATRMask;
-typedef struct _ContextAndTwoStringA_Call
+typedef struct _GetStatusChange_Return
{
- REDIR_SCARDCONTEXT hContext;
- /* [string] */ char* sz1;
- /* [string] */ char* sz2;
-} ContextAndTwoStringA_Call;
+ LONG ReturnCode;
+ /* [range] */ DWORD cReaders;
+ /* [size_is] */ ReaderState_Return* rgReaderStates;
+} LocateCards_Return;
-typedef struct _ContextAndTwoStringW_Call
+typedef struct _GetStatusChange_Return GetStatusChange_Return;
+
+typedef struct _GetReaderIcon_Return
+{
+ LONG ReturnCode;
+ ULONG cbDataLen;
+ BYTE* pbData;
+} GetReaderIcon_Return;
+
+typedef struct _GetDeviceTypeId_Return
+{
+ LONG ReturnCode;
+ ULONG dwDeviceId;
+} GetDeviceTypeId_Return;
+
+typedef struct _Connect_Return
{
+ LONG ReturnCode;
REDIR_SCARDCONTEXT hContext;
- /* [string] */ WCHAR* sz1;
- /* [string] */ WCHAR* sz2;
-} ContextAndTwoStringW_Call;
+ REDIR_SCARDHANDLE hCard;
+ DWORD dwActiveProtocol;
+} Connect_Return;
-typedef struct _EstablishContext_Call
+typedef struct Reconnect_Return
{
- DWORD dwScope;
-} EstablishContext_Call;
+ LONG ReturnCode;
+ DWORD dwActiveProtocol;
+} Reconnect_Return;
-typedef struct _EstablishContext_Return
+typedef struct _State_Return
+{
+ LONG ReturnCode;
+ DWORD dwState;
+ DWORD dwProtocol;
+ /* [range] */ DWORD cbAtrLen;
+ /* [size_is][unique] */ BYTE rgAtr[36];
+} State_Return;
+
+typedef struct _Status_Return
+{
+ LONG ReturnCode;
+ /* [range] */ DWORD cBytes;
+ /* [size_is][unique] */ BYTE* mszReaderNames;
+ DWORD dwState;
+ DWORD dwProtocol;
+ BYTE pbAtr[32];
+ /* [range] */ DWORD cbAtrLen;
+} Status_Return;
+
+typedef struct _SCardIO_Request
+{
+ DWORD dwProtocol;
+ /* [range] */ DWORD cbExtraBytes;
+ /* [size_is][unique] */ BYTE* pbExtraBytes;
+} SCardIO_Request;
+
+typedef struct _Transmit_Return
+{
+ LONG ReturnCode;
+ /* [unique] */ LPSCARD_IO_REQUEST pioRecvPci;
+ /* [range] */ DWORD cbRecvLength;
+ /* [size_is][unique] */ BYTE* pbRecvBuffer;
+} Transmit_Return;
+
+typedef struct _GetTransmitCount_Return
+{
+ LONG ReturnCode;
+ DWORD cTransmitCount;
+} GetTransmitCount_Return;
+
+typedef struct _Control_Return
+{
+ LONG ReturnCode;
+ /* [range] */ DWORD cbOutBufferSize;
+ /* [size_is][unique] */ BYTE* pvOutBuffer;
+} Control_Return;
+
+typedef struct _GetAttrib_Return
+{
+ LONG ReturnCode;
+ /* [range] */ DWORD cbAttrLen;
+ /* [size_is][unique] */ BYTE* pbAttr;
+} GetAttrib_Return;
+
+typedef struct _ReadCache_Return
{
LONG ReturnCode;
+ /* [range] */ DWORD cbDataLen;
+ /* [size_is][unique] */ BYTE* pbData;
+} ReadCache_Return;
+#pragma pack(pop)
+
+typedef struct _Handles_Call
+{
REDIR_SCARDCONTEXT hContext;
-} EstablishContext_Return;
+ REDIR_SCARDHANDLE hCard;
+} Handles_Call;
typedef struct _ListReaderGroups_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
LONG fmszGroupsIsNULL;
DWORD cchGroups;
} ListReaderGroups_Call;
typedef struct _ListReaders_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
/* [range] */ DWORD cBytes;
/* [size_is][unique] */ BYTE* mszGroups;
LONG fmszReadersIsNULL;
DWORD cchReaders;
} ListReaders_Call;
-typedef struct _ReaderState_Return
-{
- DWORD dwCurrentState;
- DWORD dwEventState;
- /* [range] */ DWORD cbAtr;
- BYTE rgbAtr[36];
-} ReaderState_Return;
-
typedef struct _GetStatusChangeA_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
DWORD dwTimeOut;
/* [range] */ DWORD cReaders;
/* [size_is] */ LPSCARD_READERSTATEA rgReaderStates;
typedef struct _LocateCardsA_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
/* [range] */ DWORD cBytes;
/* [size_is] */ CHAR* mszCards;
/* [range] */ DWORD cReaders;
typedef struct _LocateCardsW_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
/* [range] */ DWORD cBytes;
/* [size_is] */ WCHAR* mszCards;
/* [range] */ DWORD cReaders;
/* [size_is] */ LPSCARD_READERSTATEW rgReaderStates;
} LocateCardsW_Call;
-typedef struct _LocateCards_ATRMask
-{
- /* [range] */ DWORD cbAtr;
- BYTE rgbAtr[36];
- BYTE rgbMask[36];
-} LocateCards_ATRMask;
-
typedef struct _LocateCardsByATRA_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
/* [range] */ DWORD cAtrs;
/* [size_is] */ LocateCards_ATRMask* rgAtrMasks;
/* [range] */ DWORD cReaders;
typedef struct _LocateCardsByATRW_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
/* [range] */ DWORD cAtrs;
/* [size_is] */ LocateCards_ATRMask* rgAtrMasks;
/* [range] */ DWORD cReaders;
/* [size_is] */ LPSCARD_READERSTATEW rgReaderStates;
} LocateCardsByATRW_Call;
-typedef struct _GetStatusChange_Return
-{
- LONG ReturnCode;
- /* [range] */ DWORD cReaders;
- /* [size_is] */ ReaderState_Return* rgReaderStates;
-} LocateCards_Return;
-
-typedef struct _GetStatusChange_Return GetStatusChange_Return;
-
typedef struct _GetStatusChangeW_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
DWORD dwTimeOut;
/* [range] */ DWORD cReaders;
/* [size_is] */ LPSCARD_READERSTATEW rgReaderStates;
typedef struct _GetReaderIcon_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
WCHAR* szReaderName;
} GetReaderIcon_Call;
-typedef struct _GetReaderIcon_Return
-{
- LONG ReturnCode;
- ULONG cbDataLen;
- BYTE* pbData;
-} GetReaderIcon_Return;
-
typedef struct _GetDeviceTypeId_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
WCHAR* szReaderName;
} GetDeviceTypeId_Call;
-typedef struct _GetDeviceTypeId_Return
-{
- LONG ReturnCode;
- ULONG dwDeviceId;
-} GetDeviceTypeId_Return;
-
-typedef struct _Connect_Common
+typedef struct _Connect_Common_Call
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
DWORD dwShareMode;
DWORD dwPreferredProtocols;
-} Connect_Common;
+} Connect_Common_Call;
typedef struct _ConnectA_Call
{
- Connect_Common Common;
+ Connect_Common_Call Common;
/* [string] */ CHAR* szReader;
} ConnectA_Call;
typedef struct _ConnectW_Call
{
- Connect_Common Common;
+ Connect_Common_Call Common;
/* [string] */ WCHAR* szReader;
} ConnectW_Call;
-typedef struct _Connect_Return
-{
- LONG ReturnCode;
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
- DWORD dwActiveProtocol;
-} Connect_Return;
-
typedef struct _Reconnect_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
DWORD dwShareMode;
DWORD dwPreferredProtocols;
DWORD dwInitialization;
} Reconnect_Call;
-typedef struct Reconnect_Return
-{
- LONG ReturnCode;
- DWORD dwActiveProtocol;
-} Reconnect_Return;
-
typedef struct _HCardAndDisposition_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
DWORD dwDisposition;
} HCardAndDisposition_Call;
typedef struct _State_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
LONG fpbAtrIsNULL;
DWORD cbAtrLen;
} State_Call;
-typedef struct _State_Return
-{
- LONG ReturnCode;
- DWORD dwState;
- DWORD dwProtocol;
- /* [range] */ DWORD cbAtrLen;
- /* [size_is][unique] */ BYTE rgAtr[36];
-} State_Return;
-
typedef struct _Status_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
LONG fmszReaderNamesIsNULL;
DWORD cchReaderLen;
DWORD cbAtrLen;
} Status_Call;
-typedef struct _Status_Return
-{
- LONG ReturnCode;
- /* [range] */ DWORD cBytes;
- /* [size_is][unique] */ BYTE* mszReaderNames;
- DWORD dwState;
- DWORD dwProtocol;
- BYTE pbAtr[32];
- /* [range] */ DWORD cbAtrLen;
-} Status_Return;
-
-typedef struct _SCardIO_Request
-{
- DWORD dwProtocol;
- /* [range] */ DWORD cbExtraBytes;
- /* [size_is][unique] */ BYTE* pbExtraBytes;
-} SCardIO_Request;
-
typedef struct _Transmit_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
LPSCARD_IO_REQUEST pioSendPci;
/* [range] */ DWORD cbSendLength;
/* [size_is] */ BYTE* pbSendBuffer;
DWORD cbRecvLength;
} Transmit_Call;
-typedef struct _Transmit_Return
+typedef struct _Long_Call
{
- LONG ReturnCode;
- /* [unique] */ LPSCARD_IO_REQUEST pioRecvPci;
- /* [range] */ DWORD cbRecvLength;
- /* [size_is][unique] */ BYTE* pbRecvBuffer;
-} Transmit_Return;
+ Handles_Call handles;
+ LONG LongValue;
+} Long_Call;
-typedef struct _GetTransmitCount_Call
+typedef struct _Context_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
-} GetTransmitCount_Call;
+ Handles_Call handles;
+} Context_Call;
-typedef struct _GetTransmitCount_Return
+typedef struct _ContextAndStringA_Call
{
- LONG ReturnCode;
- DWORD cTransmitCount;
-} GetTransmitCount_Return;
+ Handles_Call handles;
+ /* [string] */ char* sz;
+} ContextAndStringA_Call;
+
+typedef struct _ContextAndStringW_Call
+{
+ Handles_Call handles;
+ /* [string] */ WCHAR* sz;
+} ContextAndStringW_Call;
+
+typedef struct _ContextAndTwoStringA_Call
+{
+ Handles_Call handles;
+ /* [string] */ char* sz1;
+ /* [string] */ char* sz2;
+} ContextAndTwoStringA_Call;
+
+typedef struct _ContextAndTwoStringW_Call
+{
+ Handles_Call handles;
+ /* [string] */ WCHAR* sz1;
+ /* [string] */ WCHAR* sz2;
+} ContextAndTwoStringW_Call;
+
+typedef struct _EstablishContext_Call
+{
+ Handles_Call handles;
+ DWORD dwScope;
+} EstablishContext_Call;
+
+typedef struct _GetTranmitCount_Call
+{
+ Handles_Call handles;
+} GetTransmitCount_Call;
typedef struct _Control_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
DWORD dwControlCode;
/* [range] */ DWORD cbInBufferSize;
/* [size_is][unique] */ BYTE* pvInBuffer;
DWORD cbOutBufferSize;
} Control_Call;
-typedef struct _Control_Return
-{
- LONG ReturnCode;
- /* [range] */ DWORD cbOutBufferSize;
- /* [size_is][unique] */ BYTE* pvOutBuffer;
-} Control_Return;
-
typedef struct _GetAttrib_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
DWORD dwAttrId;
LONG fpbAttrIsNULL;
DWORD cbAttrLen;
} GetAttrib_Call;
-typedef struct _GetAttrib_Return
-{
- LONG ReturnCode;
- /* [range] */ DWORD cbAttrLen;
- /* [size_is][unique] */ BYTE* pbAttr;
-} GetAttrib_Return;
-
typedef struct _SetAttrib_Call
{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
+ Handles_Call handles;
DWORD dwAttrId;
/* [range] */ DWORD cbAttrLen;
/* [size_is] */ BYTE* pbAttr;
typedef struct _ReadCache_Common
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
UUID* CardIdentifier;
DWORD FreshnessCounter;
LONG fPbDataIsNULL;
/* [string] */ WCHAR* szLookupName;
} ReadCacheW_Call;
-typedef struct _ReadCache_Return
-{
- LONG ReturnCode;
- /* [range] */ DWORD cbDataLen;
- /* [size_is][unique] */ BYTE* pbData;
-} ReadCache_Return;
typedef struct _WriteCache_Common
{
- REDIR_SCARDCONTEXT hContext;
+ Handles_Call handles;
UUID* CardIdentifier;
DWORD FreshnessCounter;
/* [range] */ DWORD cbDataLen;
/* [string] */ WCHAR* szLookupName;
} WriteCacheW_Call;
-typedef struct _Handles_Call
-{
- REDIR_SCARDCONTEXT hContext;
- REDIR_SCARDHANDLE hCard;
-} Handles_Call;
-
-#pragma pack(pop)
-
struct _SMARTCARD_OPERATION
{
IRP* irp;
GetStatusChangeW_Call getStatusChangeW;
GetReaderIcon_Call getReaderIcon;
GetDeviceTypeId_Call getDeviceTypeId;
- Connect_Common connect;
+ Connect_Common_Call connect;
ConnectA_Call connectA;
ConnectW_Call connectW;
Reconnect_Call reconnect;
static LONG smartcard_ndr_write_state(wStream* s, const ReaderState_Return* data, UINT32 size,
ndr_ptr_t type)
{
- union {
+ union
+ {
const ReaderState_Return* reader;
const BYTE* data;
} cnv;
static LONG smartcard_ndr_read_atrmask(wStream* s, LocateCards_ATRMask** data, size_t min,
ndr_ptr_t type)
{
- union {
+ union
+ {
LocateCards_ATRMask** ppc;
BYTE** ppv;
} u;
static LONG smartcard_ndr_read_fixed_string_a(wStream* s, CHAR** data, size_t min, ndr_ptr_t type)
{
- union {
+ union
+ {
CHAR** ppc;
BYTE** ppv;
} u;
static LONG smartcard_ndr_read_fixed_string_w(wStream* s, WCHAR** data, size_t min, ndr_ptr_t type)
{
- union {
+ union
+ {
WCHAR** ppc;
BYTE** ppv;
} u;
static LONG smartcard_ndr_read_a(wStream* s, CHAR** data, ndr_ptr_t type)
{
- union {
+ union
+ {
CHAR** ppc;
BYTE** ppv;
} u;
static LONG smartcard_ndr_read_w(wStream* s, WCHAR** data, ndr_ptr_t type)
{
- union {
+ union
+ {
WCHAR** ppc;
BYTE** ppv;
} u;
static LONG smartcard_ndr_read_u(wStream* s, UUID** data)
{
- union {
+ union
+ {
UUID** ppc;
BYTE** ppv;
} u;
static char* smartcard_convert_string_list(const void* in, size_t bytes, BOOL unicode)
{
size_t index, length;
- union {
+ union
+ {
const void* pv;
const char* sz;
const WCHAR* wz;
return;
WLog_LVL(TAG, g_LogLevel, "%s_Call {", name);
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, "}");
}
return;
WLog_LVL(TAG, g_LogLevel, "ListReaderGroups%S_Call {", unicode ? "W" : "A");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, "fmszGroupsIsNULL: %" PRId32 " cchGroups: 0x%08" PRIx32,
call->fmszGroupsIsNULL, call->cchGroups);
return;
WLog_LVL(TAG, g_LogLevel, "GetStatusChangeW_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, "dwTimeOut: 0x%08" PRIX32 " cReaders: %" PRIu32 "", call->dwTimeOut,
call->cReaders);
mszGroupsA = smartcard_convert_string_list(call->mszGroups, call->cBytes, unicode);
WLog_LVL(TAG, g_LogLevel, "ListReaders%s_Call {", unicode ? "W" : "A");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel,
"cBytes: %" PRIu32 " mszGroups: %s fmszReadersIsNULL: %" PRId32
return;
WLog_LVL(TAG, g_LogLevel, "LocateCardsByATRA_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
for (index = 0; index < call->cReaders; index++)
{
return;
WLog_LVL(TAG, g_LogLevel, "LocateCardsA_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, " cBytes=%" PRId32, call->cBytes);
WLog_LVL(TAG, g_LogLevel, " mszCards=%s",
smartcard_msz_dump_a(call->mszCards, call->cBytes, buffer, sizeof(buffer)));
return;
WLog_LVL(TAG, g_LogLevel, "LocateCardsW_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, " cBytes=%" PRId32, call->cBytes);
WLog_LVL(TAG, g_LogLevel, " sz2=%s",
smartcard_msz_dump_w(call->mszCards, call->cBytes, buffer, sizeof(buffer)));
return;
WLog_LVL(TAG, g_LogLevel, "ContextAndTwoStringW_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, " sz1=%s", call->sz1);
WLog_LVL(TAG, g_LogLevel, " sz2=%s", call->sz2);
WLog_LVL(TAG, g_LogLevel, "}");
return;
WLog_LVL(TAG, g_LogLevel, "ContextAndTwoStringW_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
ConvertFromUnicode(CP_UTF8, 0, call->sz1, -1, &sz1, 0, NULL, NULL);
ConvertFromUnicode(CP_UTF8, 0, call->sz2, -1, &sz2, 0, NULL, NULL);
WLog_LVL(TAG, g_LogLevel, " sz1=%s", sz1);
return;
WLog_LVL(TAG, g_LogLevel, "GetTransmitCount_Call {");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel, "}");
}
WLog_LVL(TAG, g_LogLevel, " szLookupName=%s", call->szLookupName);
- smartcard_log_context(TAG, &call->Common.hContext);
+ smartcard_log_context(TAG, &call->Common.handles.hContext);
WLog_DBG(
TAG, "..CardIdentifier=%s",
smartcard_array_dump(call->Common.CardIdentifier, sizeof(UUID), buffer, sizeof(buffer)));
ConvertFromUnicode(CP_UTF8, 0, call->szLookupName, -1, &tmp, 0, NULL, NULL);
WLog_LVL(TAG, g_LogLevel, " szLookupName=%s", tmp);
free(tmp);
- smartcard_log_context(TAG, &call->Common.hContext);
+ smartcard_log_context(TAG, &call->Common.handles.hContext);
WLog_DBG(
TAG, "..CardIdentifier=%s",
smartcard_array_dump(call->Common.CardIdentifier, sizeof(UUID), buffer, sizeof(buffer)));
WLog_LVL(TAG, g_LogLevel, "GetTransmitCount_Call {");
WLog_LVL(TAG, g_LogLevel, " szLookupName=%s", call->szLookupName);
- smartcard_log_context(TAG, &call->Common.hContext);
+ smartcard_log_context(TAG, &call->Common.handles.hContext);
WLog_DBG(
TAG, "..CardIdentifier=%s",
smartcard_array_dump(call->Common.CardIdentifier, sizeof(UUID), buffer, sizeof(buffer)));
ConvertFromUnicode(CP_UTF8, 0, call->szLookupName, -1, &tmp, 0, NULL, NULL);
WLog_LVL(TAG, g_LogLevel, " szLookupName=%s", tmp);
free(tmp);
- smartcard_log_context(TAG, &call->Common.hContext);
+ smartcard_log_context(TAG, &call->Common.handles.hContext);
WLog_DBG(
TAG, "..CardIdentifier=%s",
smartcard_array_dump(call->Common.CardIdentifier, sizeof(UUID), buffer, sizeof(buffer)));
return;
WLog_LVL(TAG, g_LogLevel, "Transmit_Call {");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
if (call->pioSendPci)
{
return;
WLog_LVL(TAG, g_LogLevel, "LocateCardsByATRW_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
for (index = 0; index < call->cReaders; index++)
{
return;
WLog_LVL(TAG, g_LogLevel, "Control_Call {");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel,
"dwControlCode: 0x%08" PRIX32 " cbInBufferSize: %" PRIu32
return;
WLog_LVL(TAG, g_LogLevel, "GetAttrib_Call {");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel, "dwAttrId: 0x%08" PRIX32, call->dwAttrId);
WLog_LVL(TAG, g_LogLevel, "cbAttrLen: 0x%08" PRId32, call->cbAttrLen);
WLog_LVL(TAG, g_LogLevel, "pbAttr: %s",
}
else if (dwAttrId == SCARD_ATTR_CURRENT_PROTOCOL_TYPE)
{
- union {
+ union
+ {
BYTE* pb;
DWORD* pd;
} attr;
return;
WLog_LVL(TAG, g_LogLevel, "GetAttrib_Call {");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel,
"dwAttrId: %s (0x%08" PRIX32 ") fpbAttrIsNULL: %" PRId32 " cbAttrLen: 0x%08" PRIX32 "",
return;
WLog_LVL(TAG, g_LogLevel, "Status%s_Call {", unicode ? "W" : "A");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel,
"fmszReaderNamesIsNULL: %" PRId32 " cchReaderLen: %" PRIu32 " cbAtrLen: %" PRIu32 "",
return;
WLog_LVL(TAG, g_LogLevel, "ConnectA_Call {");
- smartcard_log_context(TAG, &call->Common.hContext);
+ smartcard_log_context(TAG, &call->Common.handles.hContext);
WLog_LVL(TAG, g_LogLevel,
"szReader: %s dwShareMode: %s (0x%08" PRIX32 ") dwPreferredProtocols: %s (0x%08" PRIX32
ConvertFromUnicode(CP_UTF8, 0, call->szReader, -1, &szReaderA, 0, NULL, NULL);
WLog_LVL(TAG, g_LogLevel, "ConnectW_Call {");
- smartcard_log_context(TAG, &call->Common.hContext);
+ smartcard_log_context(TAG, &call->Common.handles.hContext);
WLog_LVL(TAG, g_LogLevel,
"szReader: %s dwShareMode: %s (0x%08" PRIX32 ") dwPreferredProtocols: %s (0x%08" PRIX32
return;
WLog_LVL(TAG, g_LogLevel, "%s_Call {", name);
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel, "dwDisposition: %s (0x%08" PRIX32 ")",
SCardGetDispositionString(call->dwDisposition), call->dwDisposition);
return;
WLog_LVL(TAG, g_LogLevel, "Reconnect_Call {");
- smartcard_log_context(TAG, &call->hContext);
- smartcard_log_redir_handle(TAG, &call->hCard);
+ smartcard_log_context(TAG, &call->handles.hContext);
+ smartcard_log_redir_handle(TAG, &call->handles.hCard);
WLog_LVL(TAG, g_LogLevel,
"dwShareMode: %s (0x%08" PRIX32 ") dwPreferredProtocols: %s (0x%08" PRIX32
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %" PRId32 "",
status);
{
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_INT32(s, call->fmszGroupsIsNULL); /* fmszGroupsIsNULL (4 bytes) */
Stream_Read_UINT32(s, call->cchGroups); /* cchGroups (4 bytes) */
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext));
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext));
if (status != SCARD_S_SUCCESS)
return status;
UINT32 mszGroupsNdrPtr;
call->mszGroups = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_INT32(s, call->fmszReadersIsNULL); /* fmszReadersIsNULL (4 bytes) */
Stream_Read_UINT32(s, call->cchReaders); /* cchReaders (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
if (mszGroupsNdrPtr)
}
static LONG smartcard_unpack_connect_common(SMARTCARD_DEVICE* smartcard, wStream* s,
- Connect_Common* common, UINT32* index)
+ Connect_Common_Call* common, UINT32* index)
{
LONG status;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(common->hContext), index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(common->handles.hContext), index);
if (status != SCARD_S_SUCCESS)
return status;
if (status != SCARD_S_SUCCESS)
return status;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->Common.hContext))))
+ if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s,
+ &(call->Common.handles.hContext))))
WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %" PRId32 "",
status);
if (status != SCARD_S_SUCCESS)
return status;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->Common.hContext))))
+ if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s,
+ &(call->Common.handles.hContext))))
WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %" PRId32 "",
status);
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_UINT32(s, call->dwPreferredProtocols); /* dwPreferredProtocols (4 bytes) */
Stream_Read_UINT32(s, call->dwInitialization); /* dwInitialization (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
{
WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %" PRId32 "",
status);
return status;
}
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %" PRId32 "",
status);
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_UINT32(s, call->dwDisposition); /* dwDisposition (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
smartcard_trace_hcard_and_disposition_call(smartcard, call, name);
return;
WLog_LVL(TAG, g_LogLevel, "GetStatusChangeA_Call {");
- smartcard_log_context(TAG, &call->hContext);
+ smartcard_log_context(TAG, &call->handles.hContext);
WLog_LVL(TAG, g_LogLevel, "dwTimeOut: 0x%08" PRIX32 " cReaders: %" PRIu32 "", call->dwTimeOut,
call->cReaders);
UINT32 index = 0;
call->rgReaderStates = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &ndrPtr))
return ERROR_INVALID_DATA;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
if (ndrPtr)
call->rgReaderStates = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
return STATUS_BUFFER_TOO_SMALL;
}
- Stream_Read_UINT32(s, call->dwTimeOut); /* dwTimeOut (4 bytes) */
- Stream_Read_UINT32(s, call->cReaders); /* cReaders (4 bytes) */
+ Stream_Read_UINT32(s, call->dwTimeOut); /* dwTimeOut (4 bytes) */
+ Stream_Read_UINT32(s, call->cReaders); /* cReaders (4 bytes) */
if (!smartcard_ndr_pointer_read(s, &index, &ndrPtr))
return ERROR_INVALID_DATA;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
if (ndrPtr)
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_INT32(s, call->fpbAtrIsNULL); /* fpbAtrIsNULL (4 bytes) */
Stream_Read_UINT32(s, call->cbAtrLen); /* cbAtrLen (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
return status;
if (cbAtrLen == SCARD_AUTOALLOCATE)
cbAtrLen = 0;
- Stream_Write_UINT32(s, ret->dwState); /* dwState (4 bytes) */
- Stream_Write_UINT32(s, ret->dwProtocol); /* dwProtocol (4 bytes) */
- Stream_Write_UINT32(s, cbAtrLen); /* cbAtrLen (4 bytes) */
+ Stream_Write_UINT32(s, ret->dwState); /* dwState (4 bytes) */
+ Stream_Write_UINT32(s, ret->dwProtocol); /* dwProtocol (4 bytes) */
+ Stream_Write_UINT32(s, cbAtrLen); /* cbAtrLen (4 bytes) */
if (!smartcard_ndr_pointer_write(s, &index, cbAtrLen))
return SCARD_E_NO_MEMORY;
status = smartcard_ndr_write(s, ret->rgAtr, cbAtrLen, 1, NDR_PTR_SIMPLE);
{
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_UINT32(s, call->cchReaderLen); /* cchReaderLen (4 bytes) */
Stream_Read_UINT32(s, call->cbAtrLen); /* cbAtrLen (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
smartcard_trace_status_call(smartcard, call, unicode);
if (!Stream_EnsureRemainingCapacity(s, 44))
return SCARD_F_INTERNAL_ERROR;
- Stream_Write_UINT32(s, ret->dwState); /* dwState (4 bytes) */
- Stream_Write_UINT32(s, ret->dwProtocol); /* dwProtocol (4 bytes) */
+ Stream_Write_UINT32(s, ret->dwState); /* dwState (4 bytes) */
+ Stream_Write_UINT32(s, ret->dwProtocol); /* dwProtocol (4 bytes) */
Stream_Write(s, ret->pbAtr, sizeof(ret->pbAtr)); /* pbAtr (32 bytes) */
- Stream_Write_UINT32(s, ret->cbAtrLen); /* cbAtrLen (4 bytes) */
+ Stream_Write_UINT32(s, ret->cbAtrLen); /* cbAtrLen (4 bytes) */
status = smartcard_ndr_write(s, ret->mszReaderNames, cBytes, 1, NDR_PTR_SIMPLE);
if (status != SCARD_S_SUCCESS)
return status;
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
Stream_Read_INT32(s, call->fpbAttrIsNULL); /* fpbAttrIsNULL (4 bytes) */
Stream_Read_UINT32(s, call->cbAttrLen); /* cbAttrLen (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
smartcard_trace_get_attrib_call(smartcard, call);
call->pvInBuffer = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
return STATUS_BUFFER_TOO_SMALL;
}
- Stream_Read_UINT32(s, call->dwControlCode); /* dwControlCode (4 bytes) */
- Stream_Read_UINT32(s, call->cbInBufferSize); /* cbInBufferSize (4 bytes) */
+ Stream_Read_UINT32(s, call->dwControlCode); /* dwControlCode (4 bytes) */
+ Stream_Read_UINT32(s, call->cbInBufferSize); /* cbInBufferSize (4 bytes) */
if (!smartcard_ndr_pointer_read(s, &index, &pvInBufferNdrPtr)) /* pvInBufferNdrPtr (4 bytes) */
return ERROR_INVALID_DATA;
Stream_Read_INT32(s, call->fpvOutBufferIsNULL); /* fpvOutBufferIsNULL (4 bytes) */
Stream_Read_UINT32(s, call->cbOutBufferSize); /* cbOutBufferSize (4 bytes) */
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
if (pvInBufferNdrPtr)
call->pioRecvPci = NULL;
call->pbSendBuffer = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
return STATUS_BUFFER_TOO_SMALL;
}
- Stream_Read_UINT32(s, ioSendPci.dwProtocol); /* dwProtocol (4 bytes) */
- Stream_Read_UINT32(s, ioSendPci.cbExtraBytes); /* cbExtraBytes (4 bytes) */
+ Stream_Read_UINT32(s, ioSendPci.dwProtocol); /* dwProtocol (4 bytes) */
+ Stream_Read_UINT32(s, ioSendPci.cbExtraBytes); /* cbExtraBytes (4 bytes) */
if (!smartcard_ndr_pointer_read(s, &index,
&pbExtraBytesNdrPtr)) /* pbExtraBytesNdrPtr (4 bytes) */
return ERROR_INVALID_DATA;
- Stream_Read_UINT32(s, call->cbSendLength); /* cbSendLength (4 bytes) */
+ Stream_Read_UINT32(s, call->cbSendLength); /* cbSendLength (4 bytes) */
if (!smartcard_ndr_pointer_read(s, &index,
&pbSendBufferNdrPtr)) /* pbSendBufferNdrPtr (4 bytes) */
return ERROR_INVALID_DATA;
return STATUS_INVALID_PARAMETER;
}
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
if (ioSendPci.cbExtraBytes && !pbExtraBytesNdrPtr)
UINT32 index = 0;
call->rgReaderStates = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &rgReaderStatesNdrPtr))
return ERROR_INVALID_DATA;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
if ((rgAtrMasksNdrPtr && !call->cAtrs) || (!rgAtrMasksNdrPtr && call->cAtrs))
UINT32 sz1NdrPtr, sz2NdrPtr;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &sz2NdrPtr))
return ERROR_INVALID_DATA;
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->hContext);
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->handles.hContext);
if (status != SCARD_S_SUCCESS)
return status;
LONG status;
UINT32 sz1NdrPtr, sz2NdrPtr;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &sz2NdrPtr))
return ERROR_INVALID_DATA;
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->hContext);
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->handles.hContext);
if (status != SCARD_S_SUCCESS)
return status;
LONG status;
UINT32 sz1NdrPtr, sz2NdrPtr;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
UINT32 sz1NdrPtr, sz2NdrPtr;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
UINT32 index = 0;
UINT32 ndrPtr;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &ndrPtr))
return ERROR_INVALID_DATA;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
return status;
if (ndrPtr)
UINT32 index = 0;
call->rgReaderStates = NULL;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &rgAtrMasksNdrPtr))
return ERROR_INVALID_DATA;
- Stream_Read_UINT32(s, call->cReaders); /* cReaders (4 bytes) */
+ Stream_Read_UINT32(s, call->cReaders); /* cReaders (4 bytes) */
if (!smartcard_ndr_pointer_read(s, &index, &rgReaderStatesNdrPtr))
return ERROR_INVALID_DATA;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
return status;
if ((rgAtrMasksNdrPtr && !call->cAtrs) || (!rgAtrMasksNdrPtr && call->cAtrs))
if (!smartcard_ndr_pointer_read(s, &index, &mszNdrPtr))
return ERROR_INVALID_DATA;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.handles.hContext),
+ &index);
if (status != SCARD_S_SUCCESS)
return status;
return status;
}
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.hContext);
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.handles.hContext);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &mszNdrPtr))
return ERROR_INVALID_DATA;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.handles.hContext),
+ &index);
if (status != SCARD_S_SUCCESS)
return status;
return status;
}
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.hContext);
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.handles.hContext);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &mszNdrPtr))
return ERROR_INVALID_DATA;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.handles.hContext),
+ &index);
if (status != SCARD_S_SUCCESS)
return status;
return status;
}
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.hContext);
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.handles.hContext);
if (status != SCARD_S_SUCCESS)
return status;
if (!smartcard_ndr_pointer_read(s, &index, &mszNdrPtr))
return ERROR_INVALID_DATA;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->Common.handles.hContext),
+ &index);
if (status != SCARD_S_SUCCESS)
return status;
return status;
}
- status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.hContext);
+ status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &call->Common.handles.hContext);
if (status != SCARD_S_SUCCESS)
return status;
LONG status;
UINT32 index = 0;
- status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext), &index);
+ status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->handles.hContext), &index);
if (status != SCARD_S_SUCCESS)
return status;
- status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard), &index);
+ status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->handles.hCard), &index);
if (status != SCARD_S_SUCCESS)
return status;
- if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
+ if ((status =
+ smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->handles.hContext))))
{
WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %" PRId32 "",
status);
return status;
}
- if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
+ if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->handles.hCard))))
WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %" PRId32 "",
status);
LONG smartcard_unpack_get_reader_icon_call(SMARTCARD_DEVICE* smartcard, wStream* s,
GetReaderIcon_Call* call)
{
- return smartcard_unpack_common_context_and_string_w(smartcard, s, &call->hContext,
+ return smartcard_unpack_common_context_and_string_w(smartcard, s, &call->handles.hContext,
&call->szReaderName);
}
LONG smartcard_unpack_context_and_string_a_call(SMARTCARD_DEVICE* smartcard, wStream* s,
ContextAndStringA_Call* call)
{
- return smartcard_unpack_common_context_and_string_a(smartcard, s, &call->hContext, &call->sz);
+ return smartcard_unpack_common_context_and_string_a(smartcard, s, &call->handles.hContext,
+ &call->sz);
}
LONG smartcard_unpack_context_and_string_w_call(SMARTCARD_DEVICE* smartcard, wStream* s,
ContextAndStringW_Call* call)
{
- return smartcard_unpack_common_context_and_string_w(smartcard, s, &call->hContext, &call->sz);
+ return smartcard_unpack_common_context_and_string_w(smartcard, s, &call->handles.hContext,
+ &call->sz);
}
LONG smartcard_unpack_get_device_type_id_call(SMARTCARD_DEVICE* smartcard, wStream* s,
GetDeviceTypeId_Call* call)
{
- return smartcard_unpack_common_context_and_string_w(smartcard, s, &call->hContext,
+ return smartcard_unpack_common_context_and_string_w(smartcard, s, &call->handles.hContext,
&call->szReaderName);
}