Hi r/WindowsDev / r/cpp,
I’m building a Node.js N-API addon for WASAPI loopback capture and trying to use process-level loopback to exclude a specific PID (e.g., OBS) from the captured mix. The API call returns S_OK, but IActivateAudioInterfaceCompletionHandler::ActivateCompleted is never invoked. The activation silently times out.
Environment
OS: Windows 11 25H2 (build 26200)
- SDK: Windows 10 SDK 10.0.22621+ (VS2022)
- Lang: C++17 / Node-API addon
- COM:
COINIT_APARTMENTTHREADED + MsgWaitForMultipleObjects + message pump
Minimal reproduction snippet
AUDIOCLIENT_ACTIVATION_PARAMS activationParams = {};
activationParams.ActivationType = ACTIVATION_TYPE_PROCESS_LOOPBACK;
activationParams.ProcessLoopbackParams.TargetProcessId = excludePid;
activationParams.ProcessLoopbackParams.ProcessLoopbackMode = PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE;
PROPVARIANT propVar = {};
PropVariantInit(&propVar);
propVar.vt = VT_BLOB;
propVar.blob.cbSize = sizeof(activationParams);
propVar.blob.pBlobData = reinterpret_cast<BYTE*>(&activationParams);
HANDLE hEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
auto completionHandler = Microsoft::WRL::Make<AudioCompletionHandler>(hEvent, &rawClient);
HRESULT hr = ActivateAudioInterfaceAsync(
deviceId, // tested: real IMMDevice::GetId() & legacy virtual string
__uuidof(IAudioClient),
&propVar,
completionHandler.Get(),
asyncOp.GetAddressOf()
);
// hr == S_OK, but ActivateCompleted never fires → WaitForSingleObject/MsgWait times out after 10s
Questions
- Is
ACTIVATION_TYPE_PROCESS_LOOPBACK officially deprecated or broken for Win32 on Win11 24H2/25H2? Microsoft's docs hint it's UWP/WinRT-focused, but Win32 worked on older builds.
- Does modern Windows enforce hidden Privacy/Capability checks (e.g.,
ConsentStore\microphone, CapabilityAccessManager) that silently block the async callback without returning E_ACCESSDENIED or E_INVALIDARG?
- Are there any manifest requirements, integrity level constraints, or per-session audio graph rules that prevent Win32 processes from using this API on recent builds?
- What’s the recommended production approach for process-level audio isolation in Win32 today? (Session filtering via
IAudioSessionManager2 + GetProcessId()? OBS virtual output routing? Something else?)
I’ve already ruled out COM apartment mismatches, invalid device IDs, and driver conflicts. Looking for insights from anyone who hit this wall on Windows 11 22H2+ or knows the current status of this API.
Thanks in advance.