mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[SETUPAPI][UMPNPMGR] The 3rd parameter of PNP_RegisterNotification() seems to be the service name
This commit is contained in:
parent
e4898e6e0b
commit
ece54dcd2f
3 changed files with 34 additions and 12 deletions
|
@ -3531,7 +3531,7 @@ WINAPI
|
||||||
PNP_RegisterNotification(
|
PNP_RegisterNotification(
|
||||||
handle_t hBinding,
|
handle_t hBinding,
|
||||||
DWORD ulUnknown2,
|
DWORD ulUnknown2,
|
||||||
DWORD ulUnknown3,
|
LPWSTR pszName,
|
||||||
BYTE *pNotificationFilter,
|
BYTE *pNotificationFilter,
|
||||||
DWORD ulNotificationFilterSize,
|
DWORD ulNotificationFilterSize,
|
||||||
DWORD ulFlags,
|
DWORD ulFlags,
|
||||||
|
@ -3545,8 +3545,8 @@ PNP_RegisterNotification(
|
||||||
PNOTIFY_DATA pNotifyData;
|
PNOTIFY_DATA pNotifyData;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DPRINT1("PNP_RegisterNotification(%p %lx %lx %p %lu 0x%lx %p %lx %p)\n",
|
DPRINT1("PNP_RegisterNotification(%p %lx '%S' %p %lu 0x%lx %p %lx %p)\n",
|
||||||
hBinding, ulUnknown2, ulUnknown3, pNotificationFilter,
|
hBinding, ulUnknown2, pszName, pNotificationFilter,
|
||||||
ulNotificationFilterSize, ulFlags, pulNotify, ulUnknown8, pulUnknown9);
|
ulNotificationFilterSize, ulFlags, pulNotify, ulUnknown8, pulUnknown9);
|
||||||
|
|
||||||
if (pNotificationFilter == NULL ||
|
if (pNotificationFilter == NULL ||
|
||||||
|
|
|
@ -23,9 +23,17 @@
|
||||||
|
|
||||||
#include <dbt.h>
|
#include <dbt.h>
|
||||||
#include <pnp_c.h>
|
#include <pnp_c.h>
|
||||||
|
#include <winsvc.h>
|
||||||
|
|
||||||
#include "rpc_private.h"
|
#include "rpc_private.h"
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
WINAPI
|
||||||
|
I_ScPnPGetServiceName(IN SERVICE_STATUS_HANDLE hServiceStatus,
|
||||||
|
OUT LPWSTR lpServiceName,
|
||||||
|
IN DWORD cchServiceName);
|
||||||
|
|
||||||
|
|
||||||
/* Registry key and value names */
|
/* Registry key and value names */
|
||||||
static const WCHAR Backslash[] = {'\\', 0};
|
static const WCHAR Backslash[] = {'\\', 0};
|
||||||
static const WCHAR Class[] = {'C','l','a','s','s',0};
|
static const WCHAR Class[] = {'C','l','a','s','s',0};
|
||||||
|
@ -593,6 +601,8 @@ CMP_RegisterNotification(
|
||||||
{
|
{
|
||||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
PNOTIFY_DATA pNotifyData = NULL;
|
PNOTIFY_DATA pNotifyData = NULL;
|
||||||
|
WCHAR szNameBuffer[256];
|
||||||
|
DWORD dwError;
|
||||||
DWORD ulUnknown9 = 0;
|
DWORD ulUnknown9 = 0;
|
||||||
CONFIGRET ret = CR_SUCCESS;
|
CONFIGRET ret = CR_SUCCESS;
|
||||||
|
|
||||||
|
@ -621,28 +631,40 @@ CMP_RegisterNotification(
|
||||||
|
|
||||||
pNotifyData->ulMagic = NOTIFY_MAGIC;
|
pNotifyData->ulMagic = NOTIFY_MAGIC;
|
||||||
|
|
||||||
/*
|
if ((ulFlags & DEVICE_NOTIFY_SERVICE_HANDLE) == DEVICE_NOTIFY_WINDOW_HANDLE)
|
||||||
if (dwFlags & DEVICE_NOTIFY_SERVICE_HANDLE == DEVICE_NOTYFY_WINDOW_HANDLE)
|
|
||||||
{
|
{
|
||||||
|
FIXME("Register a window\n");
|
||||||
|
|
||||||
|
/* FIXME */
|
||||||
|
szNameBuffer[0] = UNICODE_NULL;
|
||||||
}
|
}
|
||||||
else if (dwFlags & DEVICE_NOTIFY_SERVICE_HANDLE == DEVICE_NOTYFY_SERVICE_HANDLE)
|
else if ((ulFlags & DEVICE_NOTIFY_SERVICE_HANDLE) == DEVICE_NOTIFY_SERVICE_HANDLE)
|
||||||
{
|
{
|
||||||
|
FIXME("Register a service\n");
|
||||||
|
|
||||||
|
dwError = I_ScPnPGetServiceName((SERVICE_STATUS_HANDLE)hRecipient,
|
||||||
|
szNameBuffer,
|
||||||
|
ARRAYSIZE(szNameBuffer));
|
||||||
|
if (dwError != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, pNotifyData);
|
||||||
|
return CR_INVALID_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
FIXME("Register service: %S\n", szNameBuffer);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
ret = PNP_RegisterNotification(BindingHandle,
|
ret = PNP_RegisterNotification(BindingHandle,
|
||||||
0,
|
0, /* ??? */
|
||||||
0,
|
szNameBuffer,
|
||||||
(BYTE*)lpvNotificationFilter,
|
(BYTE*)lpvNotificationFilter,
|
||||||
((DEV_BROADCAST_HDR*)lpvNotificationFilter)->dbch_size,
|
((DEV_BROADCAST_HDR*)lpvNotificationFilter)->dbch_size,
|
||||||
ulFlags,
|
ulFlags,
|
||||||
&pNotifyData->ulNotifyData,
|
&pNotifyData->ulNotifyData,
|
||||||
0,
|
0, /* ??? */
|
||||||
&ulUnknown9);
|
&ulUnknown9); /* ??? */
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
|
|
|
@ -876,7 +876,7 @@ interface pnp
|
||||||
PNP_RegisterNotification(
|
PNP_RegisterNotification(
|
||||||
[in] handle_t hBinding,
|
[in] handle_t hBinding,
|
||||||
[in] DWORD ulUnknown2,
|
[in] DWORD ulUnknown2,
|
||||||
[in] DWORD ulUnknown3,
|
[in, string, ref] LPWSTR pszName,
|
||||||
[in, size_is(ulNotificationFilterSize)] BYTE *pNotificationFilter,
|
[in, size_is(ulNotificationFilterSize)] BYTE *pNotificationFilter,
|
||||||
[in] DWORD ulNotificationFilterSize,
|
[in] DWORD ulNotificationFilterSize,
|
||||||
[in] DWORD ulFlags,
|
[in] DWORD ulFlags,
|
||||||
|
|
Loading…
Reference in a new issue