DioxusLabs / DioxusLabs/dioxus
无法定位程序输入点TaskDialoglndirect于动态链接库
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
The application fails to start or crashes with the error message:
"无法定位程序输入点TaskDialoglndirect于动态链接库" (translated: "The procedure entry point TaskDialogIndirect could not be located in the dynamic link library").
This occurs when trying to run a Dioxus desktop application on Windows.
**Steps To Reproduce**
Steps to reproduce the behavior:
Build and run a Dioxus desktop application on Windows 11.
Trigger any functionality that may involve system dialogs or message boxes.
Observe the runtime error related to missing TaskDialogIndirect.
**Expected behavior**
The application should run normally without any missing DLL entry point errors, and system dialogs should display correctly.
**Screenshots**
**Environment:**
- Dioxus version: v0.7.0-alpha.1, main
- Rust version: 1.28.2, rustc 1.89.0-nightly (6ccd44760 2025-06-08)
- OS info: windows 11 24H2
- App platform: desktop
**Questionnaire**

cargo.toml :
```toml
[workspace]
resolver = "2"
members = [
"desktop", "lib_win-ui",
"lib_utils"
]
[workspace.dependencies]
dioxus = { version = "0.7.0-alpha.1" }
image = "0.25.6"
# workspace
win-ui = { path = "lib_win-ui" }
utils = { path = "lib_utils" }
anyhow = "1.0.98"
chrono = { version = "0.4.41" }
embed-resource = "3.0.2"
log = "0.4.27"
log4rs = "1.3.0"
serde_json = "1.0.140"
serde = "1.0.219"
chrono-tz = "0.10.3"
tokio = "1.45.1"
tauri = "2.5.1"
[profile]
[profile.wasm-dev]
inherits = "dev"
opt-level = 1
[profile.server-dev]
inherits = "dev"
[profile.android-dev]
inherits = "dev"
```
main.rs
```rust
#![windows_subsystem = "windows"]
use crate::views::Home;
use crate::views::Login;
use dioxus::desktop::window;
use dioxus::logger::tracing::info;
use dioxus::prelude::*;
use win_ui::AppConfigBuilder;
mod resource;
pub use resource::strings::PROJECT_NAME;
mod views;
use utils::LogUtils;
#[derive(Debug, Clone, Routable, PartialEq)]
#[rustfmt::skip]
enum Route {
#[layout(DesktopNavbar)]
#[route("/")]
Login {},
#[route("/home")]
Home { },
}
const TAILWIND_CSS: Asset = asset!("/public/tailwind.css");
const CLOSE_PNG: Asset = asset!("/assets/images/close.png");
const MAX_PNG: Asset = asset!("/assets/images/max.png");
fn main() {
LogUtils::init(env!("CARGO_PKG_NAME")).unwrap();
info!("启动程序");
let icon_bytes = include_bytes!("../assets/images/logo.png");
let title = format!("{}({})", PROJECT_NAME, env!("BUILD_TIME"));
let cfg = AppConfigBuilder::build_config(icon_bytes.to_vec(), title);
dioxus::LaunchBuilder::desktop().with_cfg(cfg).launch(App);
}
#[component]
fn App() -> Element {
rsx! {
// Global app resources
document::Link { rel: "stylesheet", href: TAILWIND_CSS }
Router:: {}
}
}
#[component]
fn DesktopNavbar() -> Element {
// Build cool things ✌️
window().set_fullscreen(true); //全屏
window().set_resizable(true);
let mut is_fullscreen = use_signal(|| true);
rsx! {
div {
class: "flex flex-col fixed h-full inset-0 ",
tabindex: "0",
onkeydown: move |e: KeyboardEvent| {
info!("keydown{:?}", e.key());
if e.data.key() == Key::Escape {
window().set_fullscreen(false);
is_fullscreen.set(false);
window().set_decorations(true);
}
},
div { class: "flex justify-end space-x-4 m-1",
div {
class: "tooltip tooltip-bottom flex items-center justify-center cursor-pointer",
margin: "10px",
"data-tip": "返回",
onclick: move |_| {
navigator().go_back();
},
div { class: "flex justify-center",
svg {
fill: "none",
stroke: "currentColor",
class: "w-8 h-8 hover:text-white cursor-pointer text-[24px] block text-gray-50",
preserve_aspect_ratio: "xMidYMid meet",
view_box: "0 0 24 24",
path { d: "M5 22a1 1 0 01-1-1V3a1 1 0 011-1h14a1 1 0 011 1v3h-2V4H6v16h12v-2h2v3a1 1 0 01-1 1H5zm13-6v-3h-7v-2h7V8l5 4-5 4z" }
}
}
}
div {
class: "tooltip tooltip-bottom m-1",
"data-tip": "切换大小",
button {
class: " hover:bg-blue-700 text-white font-bold rounded",
onclick: move |_| {
info!("click");
if is_fullscreen() {
window().set_fullscreen(false);
is_fullscreen.set(false);
window().set_decorations(true);
} else {
window().set_fullscreen(true);
is_fullscreen.set(true);
window().set_decorations(false);
}
},
img { class: "w-12 h-12", src: MAX_PNG }
}
}
div {
class: "tooltip tooltip-bottom m-1",
"data-tip": "关闭",
button {
class: " hover:bg-blue-700 text-white font-bold rounded",
onclick: move |_| {
info!("click");
window().close();
},
img { class: "w-12 h-12", src: CLOSE_PNG }
}
}
}
Outlet:: {}
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.