[SETUPAPI] Partially sync query.c with Wine Staging 1.7.47. CORE-9924

svn path=/trunk/; revision=69007
This commit is contained in:
Amine Khaldi 2015-09-04 17:29:32 +00:00
parent 1aecd02787
commit cf0892e19e
2 changed files with 12 additions and 6 deletions

View file

@ -96,8 +96,13 @@ BOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec, DWORD SearchControl,
if (InfSpec && SearchControl >= INFINFO_INF_NAME_IS_ABSOLUTE)
{
len = lstrlenA(InfSpec) + 1;
len = MultiByteToWideChar(CP_ACP, 0, InfSpec, -1, NULL, 0);
inf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!inf)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
MultiByteToWideChar(CP_ACP, 0, InfSpec, -1, inf, len);
}
@ -112,7 +117,7 @@ BOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec, DWORD SearchControl,
/***********************************************************************
* SetupGetInfInformationW (SETUPAPI.@)
*
*
* BUGS
* Only handles the case when InfSpec is an INF handle.
*/
@ -240,7 +245,7 @@ BOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation,
*/
BOOL WINAPI SetupQueryInfFileInformationW(PSP_INF_INFORMATION InfInformation,
UINT InfIndex, PWSTR ReturnBuffer,
DWORD ReturnBufferSize, PDWORD RequiredSize)
DWORD ReturnBufferSize, PDWORD RequiredSize)
{
DWORD len;
LPWSTR ptr;
@ -257,7 +262,7 @@ BOOL WINAPI SetupQueryInfFileInformationW(PSP_INF_INFORMATION InfInformation,
if (InfIndex != 0)
FIXME("Appended INF files are not handled\n");
ptr = (LPWSTR)&InfInformation->VersionData[0];
ptr = (LPWSTR)InfInformation->VersionData;
len = lstrlenW(ptr);
if (RequiredSize)
@ -589,7 +594,7 @@ BOOL WINAPI SetupGetTargetPathW( HINF hinf, PINFCONTEXT context, PCWSTR section,
else
{
SetLastError( ERROR_INSUFFICIENT_BUFFER );
HeapFree( GetProcessHeap(), 0, dir );
if (dir != systemdir) HeapFree( GetProcessHeap(), 0, dir );
return FALSE;
}
}
@ -656,7 +661,7 @@ BOOL WINAPI SetupQueryInfOriginalFileInformationW(
return FALSE;
}
inf_path = (LPWSTR)&InfInformation->VersionData[0];
inf_path = (LPWSTR)InfInformation->VersionData;
/* FIXME: we should get OriginalCatalogName from CatalogFile line in
* the original inf file and cache it, but that would require building a

View file

@ -333,6 +333,7 @@ secur32 -
reactos/dll/win32/secur32/wrapper.c # Synced to WineStaging-1.7.37
setupapi -
reactos/dll/win32/setupapi/query.c # Partial sync to WineStaging-1.7.47
reactos/dll/win32/setupapi/setupcab.c # Synced to WineStaging-1.7.47
win32k -