[SETUPAPI]

- Transform the cached OsVersionInfo structure into a OSVERSIONINFOEXW that is then reused in SetupDiGetActualSectionToInstallExW.
- Remove few unused hardcoded strings.
- Add two TRACEs in SetupDiGetActualSectionToInstallExW to debug diverse INF file installation problems.
- parser.c: enclose the contents of the for-loop inside braces.
- Implement pSetupSetGlobalFlags and pSetupModifyGlobalFlags, see https://msdn.microsoft.com/en-us/library/bb432397(v=vs.85).aspx
- Popup an error message box in InstallHinfSectionW if an error happened and if interactive setup is allowed (through the global setup flags).

svn path=/trunk/; revision=72008
This commit is contained in:
Hermès Bélusca-Maïto 2016-07-27 00:10:14 +00:00
parent 79ce70c1dd
commit 86ff038c51
7 changed files with 54 additions and 31 deletions

View file

@ -29,10 +29,10 @@
#include <share.h>
#include <fdi.h>
HINSTANCE hInstance = 0;
OSVERSIONINFOW OsVersionInfo;
HINSTANCE hInstance = NULL;
OSVERSIONINFOEXW OsVersionInfo;
static HINSTANCE CABINET_hInstance = 0;
static HINSTANCE CABINET_hInstance = NULL;
static HFDI (__cdecl *sc_FDICreate)(PFNALLOC, PFNFREE, PFNOPEN,
PFNREAD, PFNWRITE, PFNCLOSE, PFNSEEK, int, PERF);
@ -652,8 +652,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
if (!GetVersionExW(&OsVersionInfo))
OsVersionInfo.dwOSVersionInfoSize = sizeof(OsVersionInfo);
if (!GetVersionExW((POSVERSIONINFOW)&OsVersionInfo))
return FALSE;
hInstance = (HINSTANCE)hinstDLL;
break;