ReactOS 0.4.15-dev-7842-g558ab78
winscard.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#include "winscard.h"
#include "winternl.h"
Include dependency graph for winscard.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (winscard)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
HANDLE WINAPI SCardAccessStartedEvent (void)
 
LONG WINAPI SCardAddReaderToGroupA (SCARDCONTEXT context, LPCSTR reader, LPCSTR group)
 
LONG WINAPI SCardAddReaderToGroupW (SCARDCONTEXT context, LPCWSTR reader, LPCWSTR group)
 
LONG WINAPI SCardEstablishContext (DWORD dwScope, LPCVOID pvReserved1, LPCVOID pvReserved2, LPSCARDCONTEXT phContext)
 
LONG WINAPI SCardIsValidContext (SCARDCONTEXT context)
 
LONG WINAPI SCardListCardsA (SCARDCONTEXT hContext, LPCBYTE pbAtr, LPCGUID rgguidInterfaces, DWORD cguidInterfaceCount, LPSTR mszCards, LPDWORD pcchCards)
 
LONG WINAPI SCardReleaseContext (SCARDCONTEXT context)
 
LONG WINAPI SCardStatusA (SCARDHANDLE context, LPSTR szReaderName, LPDWORD pcchReaderLen, LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen)
 
LONG WINAPI SCardStatusW (SCARDHANDLE context, LPWSTR szReaderName, LPDWORD pcchReaderLen, LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbArtLen)
 
void WINAPI SCardReleaseStartedEvent (void)
 
LONG WINAPI SCardListReadersA (SCARDCONTEXT context, const CHAR *groups, CHAR *readers, DWORD *buflen)
 
LONG WINAPI SCardListReadersW (SCARDCONTEXT context, const WCHAR *groups, WCHAR *readers, DWORD *buflen)
 
LONG WINAPI SCardCancel (SCARDCONTEXT context)
 

Variables

static HANDLE g_startedEvent = NULL
 
const SCARD_IO_REQUEST g_rgSCardT0Pci = { SCARD_PROTOCOL_T0, 8 }
 
const SCARD_IO_REQUEST g_rgSCardT1Pci = { SCARD_PROTOCOL_T1, 8 }
 
const SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, 8 }
 

Function Documentation

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 35 of file winscard.c.

36{
37 TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
38
39 switch (fdwReason)
40 {
43 /* FIXME: for now, we act as if the pcsc daemon is always started */
45 break;
47 if (lpvReserved) break;
49 break;
50 }
51
52 return TRUE;
53}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:739
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
static IN DWORD IN LPVOID lpvReserved
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
Definition: synch.c:637
static HANDLE g_startedEvent
Definition: winscard.c:28

◆ SCardAccessStartedEvent()

HANDLE WINAPI SCardAccessStartedEvent ( void  )

Definition at line 55 of file winscard.c.

56{
57 return g_startedEvent;
58}

◆ SCardAddReaderToGroupA()

LONG WINAPI SCardAddReaderToGroupA ( SCARDCONTEXT  context,
LPCSTR  reader,
LPCSTR  group 
)

Definition at line 60 of file winscard.c.

61{
62 LONG retval;
63 UNICODE_STRING readerW, groupW;
64
66 else readerW.Buffer = NULL;
68 else groupW.Buffer = NULL;
69
70 retval = SCardAddReaderToGroupW(context, readerW.Buffer, groupW.Buffer);
71
72 RtlFreeUnicodeString(&readerW);
73 RtlFreeUnicodeString(&groupW);
74
75 return retval;
76}
GLboolean GLuint group
Definition: glext.h:11120
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
long LONG
Definition: pedump.c:60
Definition: http.c:7252
Definition: reader.h:84
LONG WINAPI SCardAddReaderToGroupW(SCARDCONTEXT context, LPCWSTR reader, LPCWSTR group)
Definition: winscard.c:78

◆ SCardAddReaderToGroupW()

LONG WINAPI SCardAddReaderToGroupW ( SCARDCONTEXT  context,
LPCWSTR  reader,
LPCWSTR  group 
)

Definition at line 78 of file winscard.c.

79{
80 FIXME("%x %s %s\n", (unsigned int) context, debugstr_w(reader), debugstr_w(group));
81 return SCARD_S_SUCCESS;
82}
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_w
Definition: kernel32.h:32
#define SCARD_S_SUCCESS
Definition: scarderr.h:31

Referenced by SCardAddReaderToGroupA().

◆ SCardCancel()

LONG WINAPI SCardCancel ( SCARDCONTEXT  context)

Definition at line 144 of file winscard.c.

145{
146 FIXME("(%lx) stub\n", context);
149}
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define SetLastError(x)
Definition: compat.h:752
#define SCARD_F_INTERNAL_ERROR
Definition: scarderr.h:32

◆ SCardEstablishContext()

LONG WINAPI SCardEstablishContext ( DWORD  dwScope,
LPCVOID  pvReserved1,
LPCVOID  pvReserved2,
LPSCARDCONTEXT  phContext 
)

Definition at line 84 of file winscard.c.

86{
87 FIXME("(%x,%p,%p,%p) stub\n", dwScope, pvReserved1, pvReserved2, phContext);
90}

◆ SCardIsValidContext()

LONG WINAPI SCardIsValidContext ( SCARDCONTEXT  context)

Definition at line 92 of file winscard.c.

93{
94 FIXME("(%lx) stub\n", context);
97}

◆ SCardListCardsA()

LONG WINAPI SCardListCardsA ( SCARDCONTEXT  hContext,
LPCBYTE  pbAtr,
LPCGUID  rgguidInterfaces,
DWORD  cguidInterfaceCount,
LPSTR  mszCards,
LPDWORD  pcchCards 
)

Definition at line 99 of file winscard.c.

100{
101 FIXME(": stub\n");
104}

◆ SCardListReadersA()

LONG WINAPI SCardListReadersA ( SCARDCONTEXT  context,
const CHAR groups,
CHAR readers,
DWORD buflen 
)

Definition at line 132 of file winscard.c.

133{
134 FIXME("(%lx, %s, %p, %p) stub\n", context, debugstr_a(groups), readers, buflen);
136}
GLsizei GLuint * groups
Definition: glext.h:11113
#define debugstr_a
Definition: kernel32.h:31
static struct reader readers[]
Definition: readers.c:921
#define SCARD_E_NO_READERS_AVAILABLE
Definition: scarderr.h:77

◆ SCardListReadersW()

LONG WINAPI SCardListReadersW ( SCARDCONTEXT  context,
const WCHAR groups,
WCHAR readers,
DWORD buflen 
)

Definition at line 138 of file winscard.c.

139{
140 FIXME("(%lx, %s, %p, %p) stub\n", context, debugstr_w(groups), readers, buflen);
142}

◆ SCardReleaseContext()

LONG WINAPI SCardReleaseContext ( SCARDCONTEXT  context)

Definition at line 106 of file winscard.c.

107{
108 FIXME("(%lx) stub\n", context);
111}

◆ SCardReleaseStartedEvent()

void WINAPI SCardReleaseStartedEvent ( void  )

Definition at line 127 of file winscard.c.

128{
129 FIXME("stub\n");
130}

◆ SCardStatusA()

LONG WINAPI SCardStatusA ( SCARDHANDLE  context,
LPSTR  szReaderName,
LPDWORD  pcchReaderLen,
LPDWORD  pdwState,
LPDWORD  pdwProtocol,
LPBYTE  pbAtr,
LPDWORD  pcbAtrLen 
)

Definition at line 113 of file winscard.c.

114{
115 FIXME("(%lx) stub\n", context);
118}

◆ SCardStatusW()

LONG WINAPI SCardStatusW ( SCARDHANDLE  context,
LPWSTR  szReaderName,
LPDWORD  pcchReaderLen,
LPDWORD  pdwState,
LPDWORD  pdwProtocol,
LPBYTE  pbAtr,
LPDWORD  pcbArtLen 
)

Definition at line 120 of file winscard.c.

121{
122 FIXME("(%lx) stub\n", context);
125}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( winscard  )

Variable Documentation

◆ g_rgSCardRawPci

const SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, 8 }

Definition at line 32 of file winscard.c.

◆ g_rgSCardT0Pci

const SCARD_IO_REQUEST g_rgSCardT0Pci = { SCARD_PROTOCOL_T0, 8 }

Definition at line 30 of file winscard.c.

◆ g_rgSCardT1Pci

const SCARD_IO_REQUEST g_rgSCardT1Pci = { SCARD_PROTOCOL_T1, 8 }

Definition at line 31 of file winscard.c.

◆ g_startedEvent

HANDLE g_startedEvent = NULL
static

Definition at line 28 of file winscard.c.

Referenced by DllMain(), and SCardAccessStartedEvent().