ReactOS 0.4.16-dev-1105-gafe29ee
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

SPINF_EXPORTS SpInfExports
 

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:1896
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:2505
SETUPDATA SetupData
Definition: reactos.c:41
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2801
BOOL WINAPI SetThreadLocale(LCID lcid)
Definition: locale.c:2820
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:146
_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

◆ SpInfExports

SPINF_EXPORTS SpInfExports
Initial value:
=
{
}
PCWSTR WINAPI pSetupGetField(IN PINFCONTEXT Context, IN ULONG FieldIndex)
Definition: infsupp.c:110
HINF WINAPI SetupOpenInfFileExW(IN PCWSTR FileName, IN PCWSTR InfClass, IN DWORD InfStyle, IN LCID LocaleId, OUT PUINT ErrorLine)
Definition: infsupp.c:35
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:186
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
Definition: infsupp.c:56
BOOL WINAPI SetupGetMultiSzFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:164
BOOL WINAPI SetupGetIntField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
Definition: infsupp.c:148
ULONG WINAPI SetupGetFieldCount(IN PINFCONTEXT Context)
Definition: infsupp.c:93
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
Definition: infsupp.c:82
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:45
BOOL WINAPI SetupGetBinaryField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PUCHAR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:128

Definition at line 86 of file infsupp.c.