Jinoh Kang (@iamahuman) commented about dlls/comdlg32/itemdlg.c:
}
if (!(comdlg32_actctx_state.is_active = ActivateActCtx(COMDLG32_hActCtx, &comdlg32_actctx_state.cookie)))
ERR("Failed to activate activation context, last error %lx\n", GetLastError());
SetLastError(0); res = DialogBoxParamW(COMDLG32_hInstance, MAKEINTRESOURCEW(NEWFILEOPENV3ORD), parent, itemdlg_dlgproc, (LPARAM)This); This->dlg_hwnd = NULL;
if (comdlg32_actctx_state.is_active && !DeactivateActCtx(0, comdlg32_actctx_state.cookie))
ERR("Failed to deactivate activation context, last error %lx\n", GetLastError());
if (This->user_actctx != INVALID_HANDLE_VALUE)
ReleaseActCtx(This->user_actctx);
This is optional, but I think erasing out stale value could help debugging.
```suggestion:-0+0 { ReleaseActCtx(This->user_actctx); This->user_actctx = INVALID_HANDLE_VALUE; } ```
I'm commenting this since you seemed to initialize it to `INVALID_HANDLE_VALUE` in the constructor, so maybe it's best to match that. Sorry for not suggesting this earlier!