Commit fe411406 authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

setupapi: Fix string conversion in SetupGetInfInformationA().

parent 90aab41c
...@@ -125,8 +125,13 @@ BOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec, DWORD SearchControl, ...@@ -125,8 +125,13 @@ BOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec, DWORD SearchControl,
if (InfSpec && SearchControl >= INFINFO_INF_NAME_IS_ABSOLUTE) 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)); inf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!inf)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
MultiByteToWideChar(CP_ACP, 0, InfSpec, -1, inf, len); MultiByteToWideChar(CP_ACP, 0, InfSpec, -1, inf, len);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment