[SETUPAPI] Implement StopDevice()

This commit is contained in:
Hervé Poussineau 2020-03-04 23:43:30 +01:00
parent 848d7ec633
commit 35cb8f1393
2 changed files with 18 additions and 2 deletions

View file

@ -1796,7 +1796,7 @@ CM_Disable_DevNode_Ex(
LPWSTR lpDevInst;
CONFIGRET ret;
FIXME("CM_Disable_DevNode_Ex(%p %lx %p)\n",
TRACE("CM_Disable_DevNode_Ex(%p %lx %p)\n",
dnDevInst, ulFlags, hMachine);
if (!pSetupIsUserAdmin())

View file

@ -5045,12 +5045,28 @@ ResetDevice(
#endif
}
static BOOL StopDevice(
static BOOL
StopDevice(
IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData)
{
#ifndef __WINESRC__
struct DeviceInfoSet *set = (struct DeviceInfoSet *)DeviceInfoSet;
struct DeviceInfo *deviceInfo = (struct DeviceInfo *)DeviceInfoData->Reserved;
CONFIGRET cr;
cr = CM_Disable_DevNode_Ex(deviceInfo->dnDevInst, 0, set->hMachine);
if (cr != CR_SUCCESS)
{
SetLastError(GetErrorCodeFromCrCode(cr));
return FALSE;
}
return TRUE;
#else
FIXME("Stub: StopDevice(%p %p)\n", DeviceInfoSet, DeviceInfoData);
return TRUE;
#endif
}
/***********************************************************************