Jinoh Kang (@iamahuman) commented about dlls/comdlg32/itemdlg.c:
static HRESULT create_dialog(FileDialogImpl *This, HWND parent) { INT_PTR res; + ULONG_PTR actctx_cookie = 0; + + GetCurrentActCtx(&This->user_actctx); + if (!ActivateActCtx(COMDLG32_hActCtx, &actctx_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 (actctx_cookie != 0) You shouldn't rely on `0` being an invalid cookie value.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2068#note_22479