ReactOS 0.4.15-dev-8119-g4fb2fdb
infsupp.c File Reference
#include "reactos.h"
#include <winnls.h>
#include <debug.h>
Include dependency graph for infsupp.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

PCWSTR WINAPI pSetupGetField (IN PINFCONTEXT Context, IN ULONG FieldIndex)
 
HINF WINAPI SetupOpenInfFileExW (IN PCWSTR FileName, IN PCWSTR InfClass, IN DWORD InfStyle, IN LCID LocaleId, OUT PUINT ErrorLine)
 

Variables

pSpInfCloseInfFile SpInfCloseInfFile = SetupCloseInfFile
 
pSpInfFindFirstLine SpInfFindFirstLine = SetupFindFirstLineW
 
pSpInfFindNextLine SpInfFindNextLine = SetupFindNextLine
 
pSpInfGetFieldCount SpInfGetFieldCount = SetupGetFieldCount
 
pSpInfGetBinaryField SpInfGetBinaryField = SetupGetBinaryField
 
pSpInfGetIntField SpInfGetIntField = SetupGetIntField
 
pSpInfGetMultiSzField SpInfGetMultiSzField = SetupGetMultiSzFieldW
 
pSpInfGetStringField SpInfGetStringField = SetupGetStringFieldW
 
pSpInfGetField SpInfGetField = pSetupGetField
 
pSpInfOpenInfFile SpInfOpenInfFile = SetupOpenInfFileExW
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 15 of file infsupp.c.

Function Documentation

◆ pSetupGetField()

PCWSTR WINAPI pSetupGetField ( IN PINFCONTEXT  Context,
IN ULONG  FieldIndex 
)

Definition at line 110 of file infsupp.c.

113{
114 PWCHAR Data = NULL;
116 return NULL;
117 return Data;
118}
#define NULL
Definition: types.h:112
_In_ DWORD FieldIndex
Definition: setupapi.h:1895
uint16_t * PWCHAR
Definition: typedefs.h:56
BOOLEAN InfGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
Definition: infrosget.c:127

◆ SetupOpenInfFileExW()

HINF WINAPI SetupOpenInfFileExW ( IN PCWSTR  FileName,
IN PCWSTR  InfClass,
IN DWORD  InfStyle,
IN LCID  LocaleId,
OUT PUINT  ErrorLine 
)

Definition at line 35 of file infsupp.c.

41{
42 HINF InfHandle;
43 LCID OldLocaleId;
44 WCHAR Win32FileName[MAX_PATH];
45
46 /*
47 * SetupOpenInfFileExW is called within setuplib with NT paths, however
48 * the Win32 SetupOpenInfFileW API only takes Win32 paths. We therefore
49 * map the NT path to Win32 path and then call the Win32 API.
50 */
52 Win32FileName,
53 _countof(Win32FileName),
54 FileName))
55 {
57 }
58
59 /*
60 * Because SetupAPI's SetupOpenInfFileW() function does not allow the user
61 * to specify a given LCID to use to load localized string substitutions,
62 * we temporarily change the current thread locale before calling
63 * SetupOpenInfFileW(). When we have finished we restore the original
64 * thread locale.
65 */
66 OldLocaleId = GetThreadLocale();
67 if (OldLocaleId != LocaleId)
69
70 /* Load the INF file */
71 InfHandle = SetupOpenInfFileW(Win32FileName,
72 InfClass,
73 InfStyle,
74 ErrorLine);
75
76 /* Restore the original thread locale */
77 if (OldLocaleId != LocaleId)
78 SetThreadLocale(OldLocaleId);
79
80 return InfHandle;
81}
BOOL ConvertNtPathToWin32Path(IN OUT PNT_WIN32_PATH_MAPPING_LIST MappingList, OUT PWSTR pwszPath, IN DWORD cchPathMax, IN PCWSTR pwszNTPath)
Definition: reactos.c:1523
SETUPDATA SetupData
Definition: reactos.c:42
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2800
BOOL WINAPI SetThreadLocale(LCID lcid)
Definition: locale.c:2819
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
DWORD LCID
Definition: nls.h:13
#define _countof(array)
Definition: sndvol32.h:70
NT_WIN32_PATH_MAPPING_LIST MappingList
Definition: reactos.h:126
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING _In_ PCUNICODE_STRING _In_ LCID LocaleId
Definition: wdfpdo.h:437
__wchar_t WCHAR
Definition: xmlstorage.h:180

Variable Documentation

◆ SpInfCloseInfFile

Definition at line 86 of file infsupp.c.

◆ SpInfFindFirstLine

Definition at line 87 of file infsupp.c.

◆ SpInfFindNextLine

Definition at line 88 of file infsupp.c.

◆ SpInfGetBinaryField

Definition at line 90 of file infsupp.c.

◆ SpInfGetField

pSpInfGetField SpInfGetField = pSetupGetField

Definition at line 94 of file infsupp.c.

◆ SpInfGetFieldCount

Definition at line 89 of file infsupp.c.

◆ SpInfGetIntField

pSpInfGetIntField SpInfGetIntField = SetupGetIntField

Definition at line 91 of file infsupp.c.

◆ SpInfGetMultiSzField

Definition at line 92 of file infsupp.c.

◆ SpInfGetStringField

Definition at line 93 of file infsupp.c.

◆ SpInfOpenInfFile

Definition at line 95 of file infsupp.c.