Christoph Brill : setupapi: Stub CM_Open_DevNode_Key and CM_Get_Child.

Alexandre Julliard julliard at winehq.org
Thu Apr 20 12:35:09 CDT 2017


Module: wine
Branch: stable
Commit: 4bc472c3336690a17d003a34fb2dc0747cdc71a6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4bc472c3336690a17d003a34fb2dc0747cdc71a6

Author: Christoph Brill <egore911 at gmail.com>
Date:   Thu Jan 19 15:05:01 2017 +0100

setupapi: Stub CM_Open_DevNode_Key and CM_Get_Child.

Signed-off-by: Christoph Brill <egore911 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 6b055830059bfd7afeb4e63e44f32eb28afc6c98)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 .../api-ms-win-devices-config-l1-1-1.spec          |  4 ++--
 dlls/cfgmgr32/cfgmgr32.spec                        |  4 ++--
 dlls/setupapi/setupapi.spec                        |  4 ++--
 dlls/setupapi/stubs.c                              | 22 ++++++++++++++++++++++
 include/cfgmgr32.h                                 | 14 ++++++++++++++
 5 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/dlls/api-ms-win-devices-config-l1-1-1/api-ms-win-devices-config-l1-1-1.spec b/dlls/api-ms-win-devices-config-l1-1-1/api-ms-win-devices-config-l1-1-1.spec
index 4302bbf..7888d80 100644
--- a/dlls/api-ms-win-devices-config-l1-1-1/api-ms-win-devices-config-l1-1-1.spec
+++ b/dlls/api-ms-win-devices-config-l1-1-1/api-ms-win-devices-config-l1-1-1.spec
@@ -3,7 +3,7 @@
 @ stub CM_Delete_DevNode_Key
 @ stub CM_Disable_DevNode
 @ stub CM_Enable_DevNode
-@ stub CM_Get_Child
+@ stdcall CM_Get_Child(ptr long long) setupapi.CM_Get_Child
 @ stub CM_Get_Class_Property_Keys
 @ stub CM_Get_Class_PropertyW
 @ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyW
@@ -26,7 +26,7 @@
 @ stub CM_MapCrToWin32Err
 @ stub CM_Open_Class_KeyW
 @ stub CM_Open_Device_Interface_KeyW
-@ stub CM_Open_DevNode_Key
+@ stdcall CM_Open_DevNode_Key(long long long long ptr long) setupapi.CM_Open_DevNode_Key
 @ stub CM_Query_And_Remove_SubTreeW
 @ stub CM_Register_Notification
 @ stub CM_Set_Class_PropertyW
diff --git a/dlls/cfgmgr32/cfgmgr32.spec b/dlls/cfgmgr32/cfgmgr32.spec
index 116180c..4ca4d3c 100644
--- a/dlls/cfgmgr32/cfgmgr32.spec
+++ b/dlls/cfgmgr32/cfgmgr32.spec
@@ -42,7 +42,7 @@
 @ stub CM_Free_Res_Des
 @ stub CM_Free_Res_Des_Ex
 @ stub CM_Free_Res_Des_Handle
-@ stub CM_Get_Child
+@ stdcall CM_Get_Child(ptr long long) setupapi.CM_Get_Child
 @ stub CM_Get_Child_Ex
 @ stub CM_Get_Class_Key_NameA
 @ stub CM_Get_Class_Key_NameW
@@ -133,7 +133,7 @@
 @ stub CM_Open_Class_KeyW
 @ stub CM_Open_Class_Key_ExA
 @ stub CM_Open_Class_Key_ExW
-@ stub CM_Open_DevNode_Key
+@ stdcall CM_Open_DevNode_Key(long long long long ptr long) setupapi.CM_Open_DevNode_Key
 @ stub CM_Open_DevNode_Key_Ex
 @ stub CM_Query_Arbitrator_Free_Data
 @ stub CM_Query_Arbitrator_Free_Data_Ex
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index 0eb8359..5c57c23 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -53,7 +53,7 @@
 @ stub CM_Free_Res_Des
 @ stub CM_Free_Res_Des_Ex
 @ stub CM_Free_Res_Des_Handle
-@ stub CM_Get_Child
+@ stdcall CM_Get_Child(ptr long long)
 @ stub CM_Get_Child_Ex
 @ stub CM_Get_Class_Key_NameA
 @ stub CM_Get_Class_Key_NameW
@@ -144,7 +144,7 @@
 @ stub CM_Open_Class_KeyW
 @ stub CM_Open_Class_Key_ExA
 @ stub CM_Open_Class_Key_ExW
-@ stub CM_Open_DevNode_Key
+@ stdcall CM_Open_DevNode_Key(long long long long ptr long)
 @ stub CM_Open_DevNode_Key_Ex
 @ stub CM_Query_And_Remove_SubTreeA
 @ stub CM_Query_And_Remove_SubTreeW
diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c
index 6ecf240..9b71c1c 100644
--- a/dlls/setupapi/stubs.c
+++ b/dlls/setupapi/stubs.c
@@ -79,6 +79,28 @@ CONFIGRET WINAPI CM_Disconnect_Machine(HMACHINE handle)
 }
 
 /***********************************************************************
+ *             CM_Open_DevNode_Key  (SETUPAPI.@)
+ */
+CONFIGRET WINAPI CM_Open_DevNode_Key(
+    DEVINST dnDevInst, REGSAM access, ULONG ulHardwareProfile, REGDISPOSITION disposition,
+    PHKEY phkDevice, ULONG ulFlags)
+{
+    FIXME("0x%08x 0x%08x 0x%08x 0x%08x %p 0x%08x : stub\n", dnDevInst, access, ulHardwareProfile,
+          disposition, phkDevice, ulFlags);
+    return CR_SUCCESS;
+}
+
+/***********************************************************************
+ *             CM_Get_Child  (SETUPAPI.@)
+ */
+CONFIGRET WINAPI CM_Get_Child(
+    PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags)
+{
+    FIXME("%p 0x%08x 0x%08x: stub\n", pdnDevInst, dnDevInst, ulFlags);
+    return CR_SUCCESS;
+}
+
+/***********************************************************************
  *             CM_Get_Device_ID_ExA  (SETUPAPI.@)
  */
 DWORD WINAPI CM_Get_Device_ID_ExA(
diff --git a/include/cfgmgr32.h b/include/cfgmgr32.h
index 7dc31e1..4606389 100644
--- a/include/cfgmgr32.h
+++ b/include/cfgmgr32.h
@@ -25,6 +25,8 @@
 # include <guiddef.h>
 #endif
 
+#include <winreg.h>
+
 /* cfgmgr32 doesn't use the normal convention, it adds an underscore before A/W */
 #ifdef WINE_NO_UNICODE_MACROS
 # define DECL_WINELIB_CFGMGR32_TYPE_AW(type)  /* nothing */
@@ -158,11 +160,20 @@ typedef DWORD CONFIGRET;
 #define CM_CRP_MIN                      CM_DRP_MIN
 #define CM_CRP_MAX                      CM_DRP_MAX
 
+#define RegDisposition_OpenAlways       0x00
+#define RegDisposition_OpenExisting     0x01
+
+#define CM_REGISTRY_HARDWARE            0x0000
+#define CM_REGISTRY_SOFTWARE            0x0001
+#define CM_REGISTRY_USER                0x0100
+#define CM_REGISTRY_CONFIG              0x0200
+
 typedef DWORD DEVINST, *PDEVINST;
 typedef DWORD DEVNODE, *PDEVNODE;
 typedef HANDLE HMACHINE, *PHMACHINE;
 typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
 typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
+typedef ULONG REGDISPOSITION;
 
 DECL_WINELIB_CFGMGR32_TYPE_AW(DEVNODEID)
 DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
@@ -196,6 +207,9 @@ CMAPI WORD      WINAPI CM_Get_Version(void);
 CMAPI CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST,DEVINSTID_A,ULONG);
 CMAPI CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST,DEVINSTID_W,ULONG);
 #define     CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
+CMAPI CONFIGRET WINAPI CM_Open_DevNode_Key(DEVINST dnDevInst, REGSAM access, ULONG ulHardwareProfile,
+                                           REGDISPOSITION disposition, PHKEY phkDevice, ULONG ulFlags);
+CMAPI CONFIGRET WINAPI CM_Get_Child(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags);
 
 #ifdef __cplusplus
 }




More information about the wine-cvs mailing list