aboutsummaryrefslogtreecommitdiffstats
path: root/router
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-06-02 19:12:48 -0700
committerChris Robinson <[email protected]>2023-06-02 19:12:48 -0700
commitd769041916df4efb48fd212683dc9842decc10f1 (patch)
tree0ed34fa1255a3bcfaf7a8c23b5e412402d1ee3aa /router
parente2ce51764e42154c7aa33eb9f53592e85f877255 (diff)
Start the WASAPI COM thread when initializing the backend
COM doesn't make this easy. We want to be able to get device change notifications without an open device, but we need an IMMDeviceEnumerator object to register the notification client, which requires COM to be initialized. COM must then stay initialized while we have the IMMDeviceEnumerator object, which we can't assume for the calling thread so it has to be done in the COM thread. Consequently, the COM thread must stay alive and can't quit while the DLL is loaded if we want to get those notifications without an open device, and as there's no reliable way to make the thread quit during DLL unload, the DLL must stay pinned until process exit.
Diffstat (limited to 'router')
0 files changed, 0 insertions, 0 deletions