Bug 1838123 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Using [WinObjEx64](https://github.com/hfiref0x/WinObjEx64), I wasn't able to find any HOOK_SHMEM "section" objects. Given that HOOKUTIL_MSG and HOOKUTIL_SYNC_MSG never seem to be received, I'm thinking this is no longer used.

The UiaServerConnection_HookMessage doesn't seem to provide anything useful. There is a number which seems to increment (for each connection perhaps?) and another number which is always < 10.

More promising, using [Process Explorer](https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer), I was able to find UIA named pipe objects in the form "\Device\NamedPipe\UIA_PIPE_16124_56450b81", where 16124 is the Firefox parent process id. Clients also get a handle to this pipe. Each client gets its own pipe. For example, i ran both NVDA and Narrator simultaneously. NVDA connected to \Device\NamedPipe\UIA_PIPE_16124_56450b81, while Narrator connected to \Device\NamedPipe\UIA_PIPE_16124_1d870675.

The question is how we can use this information. I'm not sure if our [code for iterating Windows handles](https://searchfox.org/mozilla-central/rev/c4202f7caf2d12e537a5e1584ff8e8e8b8465b6b/accessible/windows/msaa/CompatibilityUIA.cpp#203) can tell us which pipe each handle is associated with. There is [GetNamedPipeClientProcessId](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getnamedpipeclientprocessid?redirectedfrom=MSDN), but that requires the specific pipe handle which we probably can't access. I also found [this code for listing named pipes](https://gist.github.com/nstarke/02c57823f473702186e1db94dca8edae) which we might need to find the pipe in question.
Using [WinObjEx64](https://github.com/hfiref0x/WinObjEx64), I wasn't able to find any HOOK_SHMEM "section" objects. Given that HOOKUTIL_MSG and HOOKUTIL_SYNC_MSG never seem to be received, I'm thinking this is no longer used.

The UiaServerConnection_HookMessage doesn't seem to provide anything useful. There is a number which seems to increment (for each connection perhaps?) and another number which is always < 10.

More promising, using [Process Explorer](https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer), [I was able](https://stackoverflow.com/a/258825) to find UIA named pipe objects in the form "\Device\NamedPipe\UIA_PIPE_16124_56450b81", where 16124 is the Firefox parent process id. Clients also get a handle to this pipe. Each client gets its own pipe. For example, i ran both NVDA and Narrator simultaneously. NVDA connected to \Device\NamedPipe\UIA_PIPE_16124_56450b81, while Narrator connected to \Device\NamedPipe\UIA_PIPE_16124_1d870675. Note that you use \\.\pipe\name when accessing this via file system calls, rather than \Device\NamedPipe (which I assume relates to the kernel object directory).

The question is how we can use this information. I'm not sure if our [code for iterating Windows handles](https://searchfox.org/mozilla-central/rev/c4202f7caf2d12e537a5e1584ff8e8e8b8465b6b/accessible/windows/msaa/CompatibilityUIA.cpp#203) can tell us which pipe each handle is associated with. There is [GetNamedPipeClientProcessId](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getnamedpipeclientprocessid?redirectedfrom=MSDN), but that requires the specific pipe handle which we probably can't access. I also found [this code for listing named pipes](https://gist.github.com/nstarke/02c57823f473702186e1db94dca8edae) which we might need to find the pipe in question.

Back to Bug 1838123 Comment 4