Author: akhaldi
Date: Fri Sep 4 17:29:32 2015
New Revision: 69007
URL:
http://svn.reactos.org/svn/reactos?rev=69007&view=rev
Log:
[SETUPAPI] Partially sync query.c with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/reactos/dll/win32/setupapi/query.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/setupapi/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/query.c…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/query.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/query.c [iso-8859-1] Fri Sep 4 17:29:32 2015
@@ -96,8 +96,13 @@
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 @@
/***********************************************************************
* SetupGetInfInformationW (SETUPAPI.@)
- *
+ *
* BUGS
* Only handles the case when InfSpec is an INF handle.
*/
@@ -240,7 +245,7 @@
*/
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 @@
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 @@
else
{
SetLastError( ERROR_INSUFFICIENT_BUFFER );
- HeapFree( GetProcessHeap(), 0, dir );
+ if (dir != systemdir) HeapFree( GetProcessHeap(), 0, dir );
return FALSE;
}
}
@@ -656,7 +661,7 @@
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
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Sep 4 17:29:32 2015
@@ -333,6 +333,7 @@
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 -