On Thu Aug 29 16:15:21 2024 +0000, Elizabeth Figura wrote:
The problem isn't the name, it's the HANDLE. I suppose we *could* manually fix that up later, but letting RPC take care of it for us seems fine enough to me.
Actually, I'm a bit confused, because now I'm not sure where RPC does do that? I was assuming it was a user-marshalled type which implicitly calls DuplicateHandle(), but that's not the case.
The lack of tests in this patch set is a little disturbing. Is it possible to test this behaviour? I don't know under what circumstances handle events are sent [and I can't easily find anyone successfully using DBT_DEVTYP_HANDLE online]. We do have support for testing PnP drivers, though, if that's necessary; see dlls/ntoskrnl.exe/tests/driver_pnp.c.