From 71df39b027f9d08276fd06f2dadfc9162abcf859 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 20 Dec 2023 14:49:30 +0100 Subject: [PATCH] [IDL][SETUPAPI][UMPNPMGR] Improve PNP_RegisterNotification - The 2nd parameter is the handle to the recipient. - The 8th parameter is the callers process id. --- base/services/umpnpmgr/rpcserver.c | 8 ++++---- dll/win32/setupapi/cfgmgr.c | 2 +- sdk/include/reactos/idl/pnp.idl | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index 4e57e261e13..f493f181d5e 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -4689,13 +4689,13 @@ DWORD WINAPI PNP_RegisterNotification( handle_t hBinding, - DWORD ulUnknown2, + DWORD_PTR hRecipient, LPWSTR pszName, BYTE *pNotificationFilter, DWORD ulNotificationFilterSize, DWORD ulFlags, PNP_NOTIFY_HANDLE *pNotifyHandle, - DWORD ulUnknown8, + DWORD ulProcessId, DWORD *pulUnknown9) { PDEV_BROADCAST_DEVICEINTERFACE_W pBroadcastDeviceInterface; @@ -4703,8 +4703,8 @@ PNP_RegisterNotification( PNOTIFY_ENTRY pNotifyData = NULL; DPRINT1("PNP_RegisterNotification(%p %lx '%S' %p %lu 0x%lx %p %lx %p)\n", - hBinding, ulUnknown2, pszName, pNotificationFilter, - ulNotificationFilterSize, ulFlags, pNotifyHandle, ulUnknown8, pulUnknown9); + hBinding, hRecipient, pszName, pNotificationFilter, + ulNotificationFilterSize, ulFlags, pNotifyHandle, ulProcessId, pulUnknown9); if (pNotifyHandle == NULL) return CR_INVALID_POINTER; diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index 7fd00b122e8..b292a3c391d 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -670,7 +670,7 @@ CMP_RegisterNotification( RpcTryExcept { ret = PNP_RegisterNotification(BindingHandle, - 0, /* ??? */ + (DWORD_PTR)hRecipient, szNameBuffer, (BYTE*)lpvNotificationFilter, ((DEV_BROADCAST_HDR*)lpvNotificationFilter)->dbch_size, diff --git a/sdk/include/reactos/idl/pnp.idl b/sdk/include/reactos/idl/pnp.idl index 0a75c523f05..efe320e3e63 100644 --- a/sdk/include/reactos/idl/pnp.idl +++ b/sdk/include/reactos/idl/pnp.idl @@ -878,7 +878,7 @@ interface pnp __stdcall PNP_RegisterNotification( [in] handle_t hBinding, - [in] DWORD ulUnknown2, + [in] DWORD_PTR hRecipient, [in, string, ref] LPWSTR pszName, [in, size_is(ulNotificationFilterSize)] BYTE *pNotificationFilter, [in] DWORD ulNotificationFilterSize,