https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7eb6e426263bd972a5e8d2ce88781e9a769373fd
commit 7eb6e426263bd972a5e8d2ce88781e9a769373fd Author: Eric Kohl <eric.k...@reactos.org> AuthorDate: Sat Jun 29 13:38:42 2019 +0200 Commit: Eric Kohl <eric.k...@reactos.org> CommitDate: Sat Jun 29 13:38:42 2019 +0200 [UMPNPMGR][SETUPAPI] PNP_RegisterNotification() has got 9 parameters. --- base/services/umpnpmgr/rpcserver.c | 22 ++++++++++++++++------ dll/win32/setupapi/cfgmgr.c | 7 +++++-- sdk/include/reactos/idl/pnp.idl | 8 +++++--- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index 9277aa94c9..bda0cdb55c 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -3530,20 +3530,30 @@ DWORD WINAPI PNP_RegisterNotification( handle_t hBinding, - DWORD dwUnknown2, - DWORD dwUnknown3, + DWORD ulUnknown2, + DWORD ulUnknown3, BYTE *pNotificationFilter, DWORD ulNotificationFilterSize, DWORD ulFlags, - DWORD *pulNotify) + DWORD *pulNotify, + DWORD ulUnknown8, + DWORD *pulUnknown9) { #if 0 PNOTIFY_DATA pNotifyData; #endif - DPRINT1("PNP_RegisterNotification(%p %lx %lx %p %lu 0x%lx %p)\n", - hBinding, dwUnknown2, dwUnknown3, pNotificationFilter, - ulNotificationFilterSize, ulFlags, pulNotify); + DPRINT1("PNP_RegisterNotification(%p %lx %lx %p %lu 0x%lx %p %lx %p)\n", + hBinding, ulUnknown2, ulUnknown3, pNotificationFilter, + ulNotificationFilterSize, ulFlags, pulNotify, ulUnknown8, pulUnknown9); + + if (pNotificationFilter == NULL || + pulNotify == NULL || + pulUnknown9 == NULL) + return CR_INVALID_POINTER; + + if (ulFlags & ~0x7) + return CR_INVALID_FLAG; #if 0 pNotifyData = RtlAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(NOTIFY_DATA)); diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index c0fe4675cb..b5823a99f6 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -593,9 +593,10 @@ CMP_RegisterNotification( { RPC_BINDING_HANDLE BindingHandle = NULL; PNOTIFY_DATA pNotifyData = NULL; + DWORD ulUnknown9 = 0; CONFIGRET ret = CR_SUCCESS; - TRACE("CMP_RegisterNotification(%p %p %lu %p)\n", + FIXME("CMP_RegisterNotification(%p %p %lu %p)\n", hRecipient, lpvNotificationFilter, ulFlags, phDevNotify); if ((hRecipient == NULL) || @@ -639,7 +640,9 @@ CMP_RegisterNotification( (BYTE*)lpvNotificationFilter, ((DEV_BROADCAST_HDR*)lpvNotificationFilter)->dbch_size, ulFlags, - &pNotifyData->ulNotifyData); + &pNotifyData->ulNotifyData, + 0, + &ulUnknown9); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { diff --git a/sdk/include/reactos/idl/pnp.idl b/sdk/include/reactos/idl/pnp.idl index bbcf1c196a..13983a4e18 100644 --- a/sdk/include/reactos/idl/pnp.idl +++ b/sdk/include/reactos/idl/pnp.idl @@ -875,12 +875,14 @@ interface pnp __stdcall PNP_RegisterNotification( [in] handle_t hBinding, - [in] DWORD dwUnknown2, - [in] DWORD dwUnknown3, + [in] DWORD ulUnknown2, + [in] DWORD ulUnknown3, [in, size_is(ulNotificationFilterSize)] BYTE *pNotificationFilter, [in] DWORD ulNotificationFilterSize, [in] DWORD ulFlags, - [out] DWORD *pulNotifyData); + [out] DWORD *pulNotifyData, + [in] DWORD ulUnknown8, + [out] DWORD *pulUnknown9); /* Function 60 */ DWORD