我正在嘗試使用官方 windows-rs 板條箱使用 IUIAutomation::AddFocusChangedEventHandler,但為了使用它,我需要實作 IUIAutomationFocusChangedEventHandler 介面,我不知道如何在 rust
看來我必須定義一個結構并在其上使用實作宏:
#[implement(windows::Win32::UI::Accessibility::IUIAutomationFocusChangedEventHandler)]
struct A{}
但無論我嘗試實作什么,我都會得到“IUIAutomationFocusChangedEventHandler 不是類或介面”
uj5u.com熱心網友回復:
我似乎找到了問題所在 工具宏尚未更新為使用以“windows”而不是“Windows”開頭的路徑,因此只需添加
use windows as Windows;
并使用以“Windows”開頭的路徑似乎可以解決問題。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/359970.html
