From 975aee1a7cbf9304dc69962b3609d3ba273a8a4a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 11 Aug 2013 21:19:35 +0000 Subject: [PATCH] [SETUPAPI] - SetupDiRegisterDeviceInfo shouldn't fail if a device instance already exists - MSDN documentation for this function states: "If [SPRDI_FIND_DUPS] is not specified, the device instance is registered regardless of whether a device instance already exists for it." svn path=/trunk/; revision=59702 --- reactos/dll/win32/setupapi/devinst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/devinst.c b/reactos/dll/win32/setupapi/devinst.c index 1130b137cac..3256dbc9f88 100644 --- a/reactos/dll/win32/setupapi/devinst.c +++ b/reactos/dll/win32/setupapi/devinst.c @@ -1911,7 +1911,8 @@ BOOL WINAPI SetupDiRegisterDeviceInfo( ParentDevInst, CM_CREATE_DEVINST_NORMAL | CM_CREATE_DEVINST_DO_NOT_INSTALL, set->hMachine); - if (cr != CR_SUCCESS) + if (cr != CR_SUCCESS && + cr != CR_ALREADY_SUCH_DEVINST) { dwError = ERROR_NO_SUCH_DEVINST; }