db25b07b08c07d8d29c1aa8356930ca0776e0446
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS text-mode setup
4 * FILE: base/setup/usetup/inffile.c
5 * PURPOSE: .inf files support functions
6 * PROGRAMMERS: Hervé Poussineau
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
10 /* INCLUDES ******************************************************************/
17 /* SETUP* API COMPATIBILITY FUNCTIONS ****************************************/
19 /* Functions from the INFLIB library */
21 /* SetupOpenInfFileW with support for a user-provided LCID */
31 WCHAR Win32FileName
[MAX_PATH
];
33 UNREFERENCED_PARAMETER(LocaleId
);
36 * SetupOpenInfFileExW is called within setuplib with NT paths, however
37 * the Win32 SetupOpenInfFileW API only takes Win32 paths. We therefore
38 * map the NT path to Win32 path and then call the Win32 API.
40 if (!ConvertNtPathToWin32Path(Win32FileName
,
41 _countof(Win32FileName
),
44 return INVALID_HANDLE_VALUE
;
47 return SetupOpenInfFileW(Win32FileName
,
54 /* HELPER FUNCTIONS **********************************************************/
59 INF_OpenBufferedFileA(
72 Status
= InfOpenBufferedFile(&hInf
,
75 LANGIDFROMLCID(LocaleId
),
77 *ErrorLine
= (UINT
)ErrorLineUL
;
78 if (!NT_SUCCESS(Status
))
79 return INVALID_HANDLE_VALUE
;
83 return INVALID_HANDLE_VALUE
;
84 #endif /* !__REACTOS__ */