Added setupapi-CM_Request_Device_Eject patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-10-05 08:40:10 +10:00
parent be75db4704
commit 9d20573c6e
3 changed files with 115 additions and 0 deletions

View File

@ -287,6 +287,7 @@ patch_enable_all ()
enable_server_Timestamp_Compat="$1"
enable_server_device_manager_destroy="$1"
enable_server_send_hardware_message="$1"
enable_setupapi_CM_Request_Device_Eject="$1"
enable_setupapi_DiskSpaceList="$1"
enable_setupapi_Display_Device="$1"
enable_setupapi_HSPFILEQ_Check_Type="$1"
@ -1027,6 +1028,9 @@ patch_enable ()
server-send_hardware_message)
enable_server_send_hardware_message="$2"
;;
setupapi-CM_Request_Device_Eject)
enable_setupapi_CM_Request_Device_Eject="$2"
;;
setupapi-DiskSpaceList)
enable_setupapi_DiskSpaceList="$2"
;;
@ -6074,6 +6078,21 @@ if test "$enable_server_send_hardware_message" -eq 1; then
) >> "$patchlist"
fi
# Patchset setupapi-CM_Request_Device_Eject
# |
# | This patchset fixes the following Wine bugs:
# | * [#45879] Added CM_Request_Device_EjectA/W stub
# |
# | Modified files:
# | * dlls/setupapi/setupapi.spec, dlls/setupapi/stubs.c, include/cfgmgr32.h
# |
if test "$enable_setupapi_CM_Request_Device_Eject" -eq 1; then
patch_apply setupapi-CM_Request_Device_Eject/0001-setupapi-Added-CM_Request_Device_EjectA-W-stub.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "setupapi: Added CM_Request_Device_EjectA/W stub.", 1 },';
) >> "$patchlist"
fi
# Patchset setupapi-DiskSpaceList
# |
# | Modified files:

View File

@ -0,0 +1,95 @@
From 4c2371beddfffe95d91404cea8e5bcc911f67e78 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 4 Oct 2018 14:06:21 +1000
Subject: [PATCH] setupapi: Added CM_Request_Device_EjectA/W stub
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45879
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/setupapi/setupapi.spec | 4 ++--
dlls/setupapi/stubs.c | 18 ++++++++++++++++++
include/cfgmgr32.h | 20 ++++++++++++++++++++
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index 99509e1..64af966 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -168,8 +168,8 @@
@ stub CM_Remove_SubTree_Ex
@ stub CM_Remove_Unmarked_Children
@ stub CM_Remove_Unmarked_Children_Ex
-@ stub CM_Request_Device_EjectA
-@ stub CM_Request_Device_EjectW
+@ stdcall CM_Request_Device_EjectA(ptr ptr ptr long long)
+@ stdcall CM_Request_Device_EjectW(ptr ptr ptr long long)
@ stub CM_Request_Eject_PC
@ stub CM_Reset_Children_Marks
@ stub CM_Reset_Children_Marks_Ex
diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c
index 7c3413a..16224bf 100644
--- a/dlls/setupapi/stubs.c
+++ b/dlls/setupapi/stubs.c
@@ -698,3 +698,21 @@ BOOL WINAPI SetupDiEnumDriverInfoW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA Devi
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
+
+/***********************************************************************
+ * CM_Request_Device_EjectA (SETUPAPI.@)
+ */
+CONFIGRET WINAPI CM_Request_Device_EjectA(DEVINST dev, PPNP_VETO_TYPE type, LPSTR name, ULONG length, ULONG flags)
+{
+ FIXME("(0x%08x, %p, %p, %u, 0x%08x) stub\n", dev, type, name, length, flags);
+ return CR_SUCCESS;
+}
+
+/***********************************************************************
+ * CM_Request_Device_EjectW (SETUPAPI.@)
+ */
+CONFIGRET WINAPI CM_Request_Device_EjectW(DEVINST dev, PPNP_VETO_TYPE type, LPWSTR name, ULONG length, ULONG flags)
+{
+ FIXME("(0x%08x, %p, %p, %u, 0x%08x) stub\n", dev, type, name, length, flags);
+ return CR_SUCCESS;
+}
diff --git a/include/cfgmgr32.h b/include/cfgmgr32.h
index b8def60..97564a0 100644
--- a/include/cfgmgr32.h
+++ b/include/cfgmgr32.h
@@ -175,6 +175,23 @@ typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
typedef ULONG REGDISPOSITION;
+typedef enum _PNP_VETO_TYPE
+{
+ PNP_VetoTypeUnknown,
+ PNP_VetoLegacyDevice,
+ PNP_VetoPendingClose,
+ PNP_VetoWindowsApp,
+ PNP_VetoWindowsService,
+ PNP_VetoOutstandingOpen,
+ PNP_VetoDevice,
+ PNP_VetoDriver,
+ PNP_VetoIllegalDeviceRequest,
+ PNP_VetoInsufficientPower,
+ PNP_VetoNonDisableable,
+ PNP_VetoLegacyDriver,
+ PNP_VetoInsufficientRights
+} PNP_VETO_TYPE, *PPNP_VETO_TYPE;
+
DECL_WINELIB_CFGMGR32_TYPE_AW(DEVNODEID)
DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
@@ -212,6 +229,9 @@ 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_Request_Device_EjectA(DEVINST dev, PPNP_VETO_TYPE type, LPSTR name, ULONG length, ULONG flags);
+CMAPI CONFIGRET WINAPI CM_Request_Device_EjectW(DEVINST dev, PPNP_VETO_TYPE type, LPWSTR name, ULONG length, ULONG flags);
+#define CM_Request_Device_Eject WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex)
#ifdef __cplusplus
}
--
1.9.1

View File

@ -0,0 +1 @@
Fixes: [45879] Added CM_Request_Device_EjectA/W stub