Skip to content

Commit

Permalink
[IDL][SETUPAPI][UMPNPMGR] Improve PNP_RegisterNotification
Browse files Browse the repository at this point in the history
- The 2nd parameter is the handle to the recipient.
- The 8th parameter is the callers process id.
  • Loading branch information
EricKohl committed Dec 20, 2023
1 parent 9545980 commit 71df39b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions base/services/umpnpmgr/rpcserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4689,22 +4689,22 @@ 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;
PDEV_BROADCAST_HANDLE pBroadcastDeviceHandle;
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;
Expand Down
2 changes: 1 addition & 1 deletion dll/win32/setupapi/cfgmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ CMP_RegisterNotification(
RpcTryExcept
{
ret = PNP_RegisterNotification(BindingHandle,
0, /* ??? */
(DWORD_PTR)hRecipient,
szNameBuffer,
(BYTE*)lpvNotificationFilter,
((DEV_BROADCAST_HDR*)lpvNotificationFilter)->dbch_size,
Expand Down
2 changes: 1 addition & 1 deletion sdk/include/reactos/idl/pnp.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 71df39b

Please sign in to comment.