[v2] setupapi: Add stub for setupapi.dll.CM_Get_DevNode_Status

Rob Walker bob.mt.wya at gmail.com
Mon May 30 04:40:54 CDT 2016


Fixes https://bugs.winehq.org/show_bug.cgi?id=40691

The application now launches cleanly without a backtrace dialog
(generated by FabCheck.exe - calls API function CM_Get_DevNode_Status).

Tested on Gentoo Linux (wine - without staging patches).

Signed-off-by: Rob Walker <bob.mt.wya at gmail.com>
---
 dlls/cfgmgr32/cfgmgr32.spec |  4 ++--
 dlls/setupapi/setupapi.spec |  4 ++--
 dlls/setupapi/stubs.c       | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/dlls/cfgmgr32/cfgmgr32.spec b/dlls/cfgmgr32/cfgmgr32.spec
index f442157..90a05ab 100644
--- a/dlls/cfgmgr32/cfgmgr32.spec
+++ b/dlls/cfgmgr32/cfgmgr32.spec
@@ -60,8 +60,8 @@
 @ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr long long) setupapi.CM_Get_DevNode_Registry_PropertyW
 @ stdcall CM_Get_DevNode_Registry_Property_ExA(long long ptr ptr ptr long ptr) setupapi.CM_Get_DevNode_Registry_Property_ExA
 @ stdcall CM_Get_DevNode_Registry_Property_ExW(long long ptr ptr ptr long ptr) setupapi.CM_Get_DevNode_Registry_Property_ExW
-@ stub CM_Get_DevNode_Status
-@ stub CM_Get_DevNode_Status_Ex
+@ stdcall CM_Get_DevNode_Status(ptr ptr long long) setupapi.CM_Get_DevNode_Status
+@ stdcall CM_Get_DevNode_Status_Ex(ptr ptr long long ptr) setupapi.CM_Get_DevNode_Status_Ex
 @ stdcall CM_Get_Device_IDA(ptr ptr long long) setupapi.CM_Get_Device_IDA
 @ stdcall CM_Get_Device_IDW(ptr ptr long long) setupapi.CM_Get_Device_IDW
 @ stdcall CM_Get_Device_ID_ExA(ptr ptr long long ptr) setupapi.CM_Get_Device_ID_ExA
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index 9bfaadd..897572d 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -71,8 +71,8 @@
 @ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr long long)
 @ stdcall CM_Get_DevNode_Registry_Property_ExA(long long ptr ptr ptr long ptr)
 @ stdcall CM_Get_DevNode_Registry_Property_ExW(long long ptr ptr ptr long ptr)
-@ stub CM_Get_DevNode_Status
-@ stub CM_Get_DevNode_Status_Ex
+@ stdcall CM_Get_DevNode_Status(ptr ptr long long)
+@ stdcall CM_Get_DevNode_Status_Ex(ptr ptr long long ptr)
 @ stdcall CM_Get_Device_IDA(ptr ptr long long)
 @ stdcall CM_Get_Device_IDW(ptr ptr long long)
 @ stdcall CM_Get_Device_ID_ExA(ptr ptr long long ptr)
diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c
index ffc766b..6232bfa 100644
--- a/dlls/setupapi/stubs.c
+++ b/dlls/setupapi/stubs.c
@@ -419,6 +419,26 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW(DEVINST dev, ULONG prop, PULO
 }
 
 /***********************************************************************
+ *      CM_Get_DevNode_Status (SETUPAPI.@)
+ */
+CONFIGRET WINAPI CM_Get_DevNode_Status(PULONG pulStatus, PULONG pulProblemNumber, DEVINST dnDevInst,
+                                                       ULONG ulFlags)
+{
+    FIXME("%p %p 0x%08x 0x%08x: stub\n", pulStatus, pulProblemNumber, dnDevInst, ulFlags);
+    return CR_FAILURE;
+}
+
+/***********************************************************************
+ *      CM_Get_DevNode_Status_Ex (SETUPAPI.@)
+ */
+CONFIGRET WINAPI CM_Get_DevNode_Status_Ex(PULONG pulStatus, PULONG pulProblemNumber, DEVINST dnDevInst,
+                                                       ULONG ulFlags, HMACHINE hMachine)
+{
+    FIXME("%p %p 0x%08x 0x%08x %p: stub\n", pulStatus, pulProblemNumber, dnDevInst, ulFlags, hMachine);
+    return CR_FAILURE;
+}
+
+/***********************************************************************
  *      CM_Enumerate_Classes (SETUPAPI.@)
  */
 CONFIGRET WINAPI CM_Enumerate_Classes(ULONG index, LPGUID class, ULONG flags)
-- 
2.8.3




More information about the wine-patches mailing list