mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 12:40:33 +00:00
Merge from Wine:
Frank Richter <frank.richter@gmail.com> setupapi: Duplicate behaviour of native SetupGetInfInformation with NULL ReturnBuffer and certain ReturnBufferSizes. svn path=/trunk/; revision=24279
This commit is contained in:
parent
21ff1ddb3d
commit
2c56c7d7e8
1 changed files with 8 additions and 7 deletions
|
@ -119,6 +119,7 @@ BOOL WINAPI SetupGetInfInformationW(LPCVOID InfSpec, DWORD SearchControl,
|
||||||
{
|
{
|
||||||
HINF inf;
|
HINF inf;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
DWORD infSize;
|
||||||
|
|
||||||
TRACE("(%p, %ld, %p, %ld, %p)\n", InfSpec, SearchControl, ReturnBuffer,
|
TRACE("(%p, %ld, %p, %ld, %p)\n", InfSpec, SearchControl, ReturnBuffer,
|
||||||
ReturnBufferSize, RequiredSize);
|
ReturnBufferSize, RequiredSize);
|
||||||
|
@ -133,12 +134,6 @@ BOOL WINAPI SetupGetInfInformationW(LPCVOID InfSpec, DWORD SearchControl,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ReturnBuffer && ReturnBufferSize)
|
|
||||||
{
|
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (SearchControl)
|
switch (SearchControl)
|
||||||
{
|
{
|
||||||
case INFINFO_INF_SPEC_IS_HINF:
|
case INFINFO_INF_SPEC_IS_HINF:
|
||||||
|
@ -170,7 +165,13 @@ BOOL WINAPI SetupGetInfInformationW(LPCVOID InfSpec, DWORD SearchControl,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = fill_inf_info(inf, ReturnBuffer, ReturnBufferSize, RequiredSize);
|
ret = fill_inf_info(inf, ReturnBuffer, ReturnBufferSize, &infSize);
|
||||||
|
if (!ReturnBuffer && (ReturnBufferSize >= infSize))
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
if (RequiredSize) *RequiredSize = infSize;
|
||||||
|
|
||||||
if (SearchControl >= INFINFO_INF_NAME_IS_ABSOLUTE)
|
if (SearchControl >= INFINFO_INF_NAME_IS_ABSOLUTE)
|
||||||
SetupCloseInfFile(inf);
|
SetupCloseInfFile(inf);
|
||||||
|
|
Loading…
Reference in a new issue