[SETUPAPI] CMP_RegisterNotification: Do not fail if we cannot retrieve a window title

This commit is contained in:
Eric Kohl 2023-12-20 15:20:01 +01:00
parent 92942fbbd8
commit 9277f5352a

View file

@ -636,6 +636,8 @@ CMP_RegisterNotification(
pNotifyData->ulMagic = NOTIFY_MAGIC;
pNotifyData->hNotifyHandle = NULL;
ZeroMemory(szNameBuffer, sizeof(szNameBuffer));
if ((ulFlags & DEVICE_NOTIFY_SERVICE_HANDLE) == DEVICE_NOTIFY_WINDOW_HANDLE)
{
FIXME("Register a window\n");
@ -645,8 +647,12 @@ CMP_RegisterNotification(
ARRAYSIZE(szNameBuffer));
if (nLength == 0)
{
HeapFree(GetProcessHeap(), 0, pNotifyData);
return CR_INVALID_DATA;
}
if (nLength == 0)
{
szNameBuffer[0] = UNICODE_NULL;
}
FIXME("Register window: %S\n", szNameBuffer);