Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

360 lines
12 KiB

/*
Copyright (c) 1990-2000 Microsoft Corporation
Module Name:
scredir.idl
Abstract:
This module defines idl used to redirect the Smart Card Subsystem
for Terminal Services.
Revision History:
--*/
import "unknwn.idl";
[ uuid (A35AF600-9CF4-11CD-A076-08002B2BD711),
version(1.0),
pointer_default(unique)
]
interface type_scard_pack
{
const short ATR_SIZE = 32;
//
// Packing for calls that use the same params
//
typedef struct _REDIR_SCARDCONTEXT
{
DWORD cbContext;
[unique] [size_is(cbContext)] BYTE *pbContext;
} REDIR_SCARDCONTEXT;
typedef struct _REDIR_SCARDHANDLE
{
REDIR_SCARDCONTEXT Context;
DWORD cbHandle;
[size_is(cbHandle)] BYTE *pbHandle;
} REDIR_SCARDHANDLE;
typedef struct _Long_Return
{
LONG ReturnCode;
} Long_Return;
typedef struct _LongAndMultiString_Return
{
LONG ReturnCode;
DWORD cBytes;
[unique] [size_is(cBytes)] BYTE *msz;
} ListReaderGroups_Return, ListReaders_Return;
typedef struct _Context_Call
{
REDIR_SCARDCONTEXT Context;
} Context_Call;
typedef struct _ContextAndStringA_Call
{
REDIR_SCARDCONTEXT Context;
LPCSTR sz;
} ContextAndStringA_Call;
typedef struct _ContextAndStringW_Call
{
REDIR_SCARDCONTEXT Context;
LPCWSTR sz;
} ContextAndStringW_Call;
typedef struct _ContextAndTwoStringA_Call
{
REDIR_SCARDCONTEXT Context;
LPCSTR sz1;
LPCSTR sz2;
} ContextAndTwoStringA_Call;
typedef struct _ContextAndTwoStringW_Call
{
REDIR_SCARDCONTEXT Context;
LPCWSTR sz1;
LPCWSTR sz2;
} ContextAndTwoStringW_Call;
//
// Call specific packing
//
typedef struct _EstablishContext_Call
{
DWORD dwScope;
} EstablishContext_Call;
typedef struct _EstablishContext_Return
{
LONG ReturnCode;
REDIR_SCARDCONTEXT Context;
} EstablishContext_Return;
typedef struct _ListReaderGroups_Call
{
REDIR_SCARDCONTEXT Context;
BOOL fmszGroupsIsNULL;
DWORD cchGroups;
} ListReaderGroups_Call;
typedef struct _ListReaders_Call
{
REDIR_SCARDCONTEXT Context;
DWORD cBytes;
[unique] [size_is(cBytes)] const BYTE *mszGroups;
BOOL fmszReadersIsNULL;
DWORD cchReaders;
} ListReaders_Call;
typedef struct _ReaderState_Common_Call
{
DWORD dwCurrentState;
DWORD dwEventState;
DWORD cbAtr;
BYTE rgbAtr[36];
} ReaderState_Common_Call;
typedef struct _ReaderStateA
{
LPCSTR szReader;
ReaderState_Common_Call Common;
} ReaderStateA;
typedef struct _ReaderStateW
{
LPCWSTR szReader;
ReaderState_Common_Call Common;
} ReaderStateW;
typedef struct _ReaderState_Return
{
DWORD dwCurrentState;
DWORD dwEventState;
DWORD cbAtr;
BYTE rgbAtr[36];
} ReaderState_Return;
typedef struct _LocateCardsA_Call
{
REDIR_SCARDCONTEXT Context;
DWORD cBytes;
[size_is(cBytes)] const BYTE *mszCards;
DWORD cReaders;
[size_is(cReaders)] ReaderStateA *rgReaderStates;
} LocateCardsA_Call;
typedef struct _LocateCardsW_Call
{
REDIR_SCARDCONTEXT Context;
DWORD cBytes;
[size_is(cBytes)] const BYTE *mszCards;
DWORD cReaders;
[size_is(cReaders)] ReaderStateW *rgReaderStates;
} LocateCardsW_Call;
typedef struct _LocateCards_ATRMask
{
DWORD cbAtr;
BYTE rgbAtr[36];
BYTE rgbMask[36];
} LocateCards_ATRMask;
typedef struct _LocateCardsByATRA_Call
{
REDIR_SCARDCONTEXT Context;
DWORD cAtrs;
[size_is(cAtrs)] LocateCards_ATRMask *rgAtrMasks;
DWORD cReaders;
[size_is(cReaders)] ReaderStateA *rgReaderStates;
} LocateCardsByATRA_Call;
typedef struct _LocateCardsByATRW_Call
{
REDIR_SCARDCONTEXT Context;
DWORD cAtrs;
[size_is(cAtrs)] LocateCards_ATRMask *rgAtrMasks;
DWORD cReaders;
[size_is(cReaders)] ReaderStateW *rgReaderStates;
} LocateCardsByATRW_Call;
typedef struct _LocateCards_Return
{
LONG ReturnCode;
DWORD cReaders;
[size_is(cReaders)] ReaderState_Return *rgReaderStates;
} LocateCards_Return, GetStatusChange_Return;
typedef struct _GetStatusChangeA_Call
{
REDIR_SCARDCONTEXT Context;
DWORD dwTimeOut;
DWORD cReaders;
[size_is(cReaders)] ReaderStateA *rgReaderStates;
} GetStatusChangeA_Call;
typedef struct _GetStatusChangeW_Call
{
REDIR_SCARDCONTEXT Context;
DWORD dwTimeOut;
DWORD cReaders;
[size_is(cReaders)] ReaderStateW *rgReaderStates;
} GetStatusChangeW_Call;
typedef struct _Connect_Common
{
REDIR_SCARDCONTEXT Context;
DWORD dwShareMode;
DWORD dwPreferredProtocols;
} Connect_Common;
typedef struct _ConnectA_Call
{
LPCSTR szReader;
Connect_Common Common;
} ConnectA_Call;
typedef struct _ConnectW_Call
{
LPCWSTR szReader;
Connect_Common Common;
} ConnectW_Call;
typedef struct _Connect_Return
{
LONG ReturnCode;
REDIR_SCARDHANDLE hCard;
DWORD dwActiveProtocol;
} Connect_Return;
typedef struct _Reconnect_Call
{
REDIR_SCARDHANDLE hCard;
DWORD dwShareMode;
DWORD dwPreferredProtocols;
DWORD dwInitialization;
} Reconnect_Call;
typedef struct Reconnect_Return
{
LONG ReturnCode;
DWORD dwActiveProtocol;
} Reconnect_Return;
typedef struct _HCardAndDisposition_Call
{
REDIR_SCARDHANDLE hCard;
DWORD dwDisposition;
} HCardAndDisposition_Call;
typedef struct _State_Call
{
REDIR_SCARDHANDLE hCard;
BOOL fpbAtrIsNULL;
DWORD cbAtrLen;
} State_Call;
typedef struct _State_Return
{
LONG ReturnCode;
DWORD dwState;
DWORD dwProtocol;
DWORD cbAtrLen;
[unique] [size_is(cbAtrLen)] BYTE *rgAtr;
} State_Return;
typedef struct _Status_Call
{
REDIR_SCARDHANDLE hCard;
BOOL fmszReaderNamesIsNULL;
DWORD cchReaderLen;
DWORD cbAtrLen;
} Status_Call;
typedef struct _Status_Return
{
LONG ReturnCode;
DWORD cBytes;
[unique] [size_is(cBytes)] BYTE *mszReaderNames;
DWORD dwState;
DWORD dwProtocol;
BYTE pbAtr[ATR_SIZE];
DWORD cbAtrLen;
} Status_Return;
typedef struct _SCardIO_Request
{
DWORD dwProtocol;
DWORD cbExtraBytes;
[unique] [size_is(cbExtraBytes)] BYTE *pbExtraBytes;
} SCardIO_Request;
typedef struct _Transmit_Call
{
REDIR_SCARDHANDLE hCard;
SCardIO_Request ioSendPci;
DWORD cbSendLength;
[size_is(cbSendLength)] const BYTE *pbSendBuffer;
[unique] SCardIO_Request *pioRecvPci;
BOOL fpbRecvBufferIsNULL;
DWORD cbRecvLength;
} Transmit_Call;
typedef struct _Transmit_Return
{
LONG ReturnCode;
[unique] SCardIO_Request *pioRecvPci;
DWORD cbRecvLength;
[unique] [size_is(cbRecvLength)] BYTE *pbRecvBuffer;
} Transmit_Return;
typedef struct _Control_Call
{
REDIR_SCARDHANDLE hCard;
DWORD dwControlCode;
DWORD cbInBufferSize;
[unique] [size_is(cbInBufferSize)] const BYTE *pvInBuffer;
BOOL fpvOutBufferIsNULL;
DWORD cbOutBufferSize;
} Control_Call;
typedef struct _Control_Return
{
LONG ReturnCode;
DWORD cbOutBufferSize;
[unique] [size_is(cbOutBufferSize)] BYTE *pvOutBuffer;
} Control_Return;
typedef struct _GetAttrib_Call
{
REDIR_SCARDHANDLE hCard;
DWORD dwAttrId;
BOOL fpbAttrIsNULL;
DWORD cbAttrLen;
} GetAttrib_Call;
typedef struct _GetAttrib_Return
{
LONG ReturnCode;
DWORD cbAttrLen;
[unique] [size_is(cbAttrLen)] BYTE *pbAttr;
} GetAttrib_Return;
typedef struct _SetAttrib_Call
{
REDIR_SCARDHANDLE hCard;
DWORD dwAttrId;
DWORD cbAttrLen;
[size_is(cbAttrLen)] const BYTE *pbAttr;
} SetAttrib_Call;
}