mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
- Implement SetupDiSetDeviceInstallParamsA.
svn path=/trunk/; revision=38494
This commit is contained in:
parent
607be3272e
commit
e28ed99f1b
2 changed files with 37 additions and 1 deletions
|
@ -4242,6 +4242,42 @@ SetupDiSetDeviceInstallParamsW(
|
|||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI SetupDiSetDeviceInstallParamsA(
|
||||
HDEVINFO DeviceInfoSet,
|
||||
PSP_DEVINFO_DATA DeviceInfoData,
|
||||
PSP_DEVINSTALL_PARAMS_A DeviceInstallParams)
|
||||
{
|
||||
SP_DEVINSTALL_PARAMS_W deviceInstallParamsW;
|
||||
int len = 0;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("%p %p %p\n", DeviceInfoSet, DeviceInfoData, DeviceInstallParams);
|
||||
|
||||
if (DeviceInstallParams == NULL)
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
else if (DeviceInstallParams->cbSize < sizeof(SP_DEVINSTALL_PARAMS_A))
|
||||
SetLastError(ERROR_INVALID_USER_BUFFER);
|
||||
else
|
||||
{
|
||||
memcpy(&deviceInstallParamsW, DeviceInstallParams, FIELD_OFFSET(SP_DEVINSTALL_PARAMS_A, DriverPath));
|
||||
deviceInstallParamsW.cbSize = sizeof(SP_DEVINSTALL_PARAMS_W);
|
||||
len = MultiByteToWideChar(CP_ACP, 0, DeviceInstallParams->DriverPath, -1, NULL, 0);
|
||||
if (!len)
|
||||
{
|
||||
ERR("DrivePath is NULL\n");
|
||||
ret = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, DeviceInstallParams->DriverPath, -1, deviceInstallParamsW.DriverPath, len);
|
||||
ret = SetupDiSetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &deviceInstallParamsW);
|
||||
}
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HKEY
|
||||
OpenHardwareProfileKey(
|
||||
IN HKEY HKLM,
|
||||
|
|
|
@ -382,7 +382,7 @@
|
|||
@ stub SetupDiSelectOEMDrv
|
||||
@ stdcall SetupDiSetClassInstallParamsA(ptr ptr ptr long)
|
||||
@ stdcall SetupDiSetClassInstallParamsW(ptr ptr ptr long)
|
||||
@ stub SetupDiSetDeviceInstallParamsA
|
||||
@ stdcall SetupDiSetDeviceInstallParamsA(ptr ptr ptr)
|
||||
@ stdcall SetupDiSetDeviceInstallParamsW(ptr ptr ptr)
|
||||
@ stdcall SetupDiSetDeviceRegistryPropertyA(ptr ptr long ptr long)
|
||||
@ stdcall SetupDiSetDeviceRegistryPropertyW(ptr ptr long ptr long)
|
||||
|
|
Loading…
Reference in a new issue