FreeRDP
smartcard_pcsc.h File Reference
#include <winpr/platform.h>
#include <winpr/smartcard.h>
This graph shows which files directly or indirectly include this file:

Data Structures

struct  PCSC_SCARD_READERSTATE
 
struct  PCSC_SCARD_IO_REQUEST
 
struct  PCSC_TLV_STRUCTURE
 

Macros

#define PCSC_SCARD_UNKNOWN   0x0001
 
#define PCSC_SCARD_ABSENT   0x0002
 
#define PCSC_SCARD_PRESENT   0x0004
 
#define PCSC_SCARD_SWALLOWED   0x0008
 
#define PCSC_SCARD_POWERED   0x0010
 
#define PCSC_SCARD_NEGOTIABLE   0x0020
 
#define PCSC_SCARD_SPECIFIC   0x0040
 
#define PCSC_SCARD_PROTOCOL_RAW   0x00000004u
 
#define PCSC_SCARD_PROTOCOL_T15   0x00000008u
 
#define PCSC_MAX_BUFFER_SIZE   264
 
#define PCSC_MAX_BUFFER_SIZE_EXTENDED   (4 + 3 + (1 << 16) + 3 + 2)
 
#define PCSC_MAX_ATR_SIZE   33
 
#define PCSC_SCARD_AUTOALLOCATE   (PCSC_DWORD)(-1)
 
#define PCSC_SCARD_CTL_CODE(code)   (0x42000000 + (code))
 
#define PCSC_CM_IOCTL_GET_FEATURE_REQUEST   PCSC_SCARD_CTL_CODE(3400)
 

Typedefs

typedef unsigned char PCSC_BYTE
 
typedef unsigned char PCSC_UCHAR
 
typedef PCSC_UCHARPCSC_PUCHAR
 
typedef unsigned short PCSC_USHORT
 
typedef unsigned long PCSC_ULONG
 
typedef void * PCSC_LPVOID
 
typedef const void * PCSC_LPCVOID
 
typedef unsigned long PCSC_DWORD
 
typedef PCSC_DWORDPCSC_PDWORD
 
typedef long PCSC_LONG
 
typedef const char * PCSC_LPCSTR
 
typedef const PCSC_BYTEPCSC_LPCBYTE
 
typedef PCSC_BYTEPCSC_LPBYTE
 
typedef PCSC_DWORDPCSC_LPDWORD
 
typedef char * PCSC_LPSTR
 
typedef PCSC_LPSTR PCSC_LPTSTR
 
typedef PCSC_LPCSTR PCSC_LPCTSTR
 
typedef short PCSC_BOOL
 
typedef unsigned short PCSC_WORD
 
typedef PCSC_ULONGPCSC_PULONG
 

Functions

int PCSC_InitializeSCardApi (void)
 
const SCardApiFunctionTablePCSC_GetSCardApiFunctionTable (void)
 

Macro Definition Documentation

◆ PCSC_CM_IOCTL_GET_FEATURE_REQUEST

#define PCSC_CM_IOCTL_GET_FEATURE_REQUEST   PCSC_SCARD_CTL_CODE(3400)

◆ PCSC_MAX_ATR_SIZE

#define PCSC_MAX_ATR_SIZE   33

◆ PCSC_MAX_BUFFER_SIZE

#define PCSC_MAX_BUFFER_SIZE   264

◆ PCSC_MAX_BUFFER_SIZE_EXTENDED

#define PCSC_MAX_BUFFER_SIZE_EXTENDED   (4 + 3 + (1 << 16) + 3 + 2)

◆ PCSC_SCARD_ABSENT

#define PCSC_SCARD_ABSENT   0x0002

◆ PCSC_SCARD_AUTOALLOCATE

#define PCSC_SCARD_AUTOALLOCATE   (PCSC_DWORD)(-1)

◆ PCSC_SCARD_CTL_CODE

#define PCSC_SCARD_CTL_CODE (   code)    (0x42000000 + (code))

◆ PCSC_SCARD_NEGOTIABLE

#define PCSC_SCARD_NEGOTIABLE   0x0020

◆ PCSC_SCARD_POWERED

#define PCSC_SCARD_POWERED   0x0010

◆ PCSC_SCARD_PRESENT

#define PCSC_SCARD_PRESENT   0x0004

◆ PCSC_SCARD_PROTOCOL_RAW

#define PCSC_SCARD_PROTOCOL_RAW   0x00000004u

◆ PCSC_SCARD_PROTOCOL_T15

#define PCSC_SCARD_PROTOCOL_T15   0x00000008u

◆ PCSC_SCARD_SPECIFIC

#define PCSC_SCARD_SPECIFIC   0x0040

◆ PCSC_SCARD_SWALLOWED

#define PCSC_SCARD_SWALLOWED   0x0008

◆ PCSC_SCARD_UNKNOWN

#define PCSC_SCARD_UNKNOWN   0x0001

Typedef Documentation

◆ PCSC_BOOL

typedef short PCSC_BOOL

◆ PCSC_BYTE

typedef unsigned char PCSC_BYTE

WinPR: Windows Portable Runtime Smart Card API

Copyright 2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2020 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2020 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. On Windows, DWORD and ULONG are defined to unsigned long. However, 64-bit Windows uses the LLP64 model which defines unsigned long as a 4-byte type, while most non-Windows systems use the LP64 model where unsigned long is 8 bytes.

WinPR correctly defines DWORD and ULONG to be 4-byte types regardless of LLP64/LP64, but this has the side effect of breaking compatibility with the broken pcsc-lite types.

To make matters worse, pcsc-lite correctly defines the data types on OS X, but not on other platforms.

◆ PCSC_DWORD

typedef unsigned long PCSC_DWORD

◆ PCSC_LONG

typedef long PCSC_LONG

◆ PCSC_LPBYTE

◆ PCSC_LPCBYTE

typedef const PCSC_BYTE* PCSC_LPCBYTE

◆ PCSC_LPCSTR

typedef const char* PCSC_LPCSTR

◆ PCSC_LPCTSTR

◆ PCSC_LPCVOID

typedef const void* PCSC_LPCVOID

◆ PCSC_LPDWORD

◆ PCSC_LPSTR

typedef char* PCSC_LPSTR

◆ PCSC_LPTSTR

◆ PCSC_LPVOID

typedef void* PCSC_LPVOID

◆ PCSC_PDWORD

◆ PCSC_PUCHAR

◆ PCSC_PULONG

◆ PCSC_UCHAR

typedef unsigned char PCSC_UCHAR

◆ PCSC_ULONG

typedef unsigned long PCSC_ULONG

◆ PCSC_USHORT

typedef unsigned short PCSC_USHORT

◆ PCSC_WORD

typedef unsigned short PCSC_WORD

Function Documentation

◆ PCSC_GetSCardApiFunctionTable()

const SCardApiFunctionTable* PCSC_GetSCardApiFunctionTable ( void  )
Here is the caller graph for this function:

◆ PCSC_InitializeSCardApi()

int PCSC_InitializeSCardApi ( void  )
Here is the call graph for this function:
Here is the caller graph for this function: