{"record":{"id":"2a57c9dbb5dfd769","repo":"BigPizzaV3/CodexPlusPlus","slug":"shellexecutew-returned-code","errorCode":null,"errorMessage":"ShellExecuteW returned {code}","messagePattern":"ShellExecuteW returned (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/windows_integration.rs","lineNumber":171,"sourceCode":"}\n\n#[cfg(windows)]\npub fn open_url(url: &str) -> anyhow::Result<()> {\n    let operation = wide_null(\"open\");\n    let file = wide_null(url);\n    let result = unsafe {\n        ShellExecuteW(\n            None,\n            PCWSTR(operation.as_ptr()),\n            PCWSTR(file.as_ptr()),\n            PCWSTR::null(),\n            PCWSTR::null(),\n            SW_SHOWMINNOACTIVE,\n        )\n    };\n    let code = result.0 as isize;\n    if code <= 32 {\n        anyhow::bail!(\"ShellExecuteW returned {code}\");\n    }\n    Ok(())\n}\n\n#[cfg(windows)]\npub fn set_current_user_string_value(subkey: &str, name: &str, value: &str) -> anyhow::Result<()> {\n    with_created_current_user_key(subkey, |key| {\n        let value = wide_null(value);\n        let bytes = slice_as_u8(&value);\n        unsafe {\n            RegSetValueExW(\n                key,\n                PCWSTR(wide_null(name).as_ptr()),\n                0,\n                REG_SZ,\n                Some(bytes),\n            )\n        }","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/1f431ae49b57b3055e0e6845ba6156c6b4232b4d/crates/codex-plus-core/src/windows_integration.rs#L153-L189","documentation":"Error \"ShellExecuteW returned {code}\" thrown in BigPizzaV3/CodexPlusPlus.","triggerScenarios":"Thrown at crates/codex-plus-core/src/windows_integration.rs:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f431ae49b57b3055e0e6845ba6156c6b4232b4d","analyzedAt":"2026-08-16T20:54:18.598Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}