-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win32_Web_MsHtml missing #2813
Comments
Without code, function name or an error, this bug is incomplete/invalid. Feel free to try again and we'll re-open. |
Trying to compile with |
Not sure I fully understand, this means |
Ah! As @Nerixyz mentioned, There was some interest in maybe generating separate bindings for this, is that something you'd need/use? (mshtml is on the way out in Windows) |
I want to port Some details on my trails here: Now I'm stuck working with |
While this is sometimes useful, it is very rare. In cases like this, you can use the [build-dependencies.windows-bindgen]
git = "https://github.com/microsoft/windows-rs"
[dependencies.windows-core]
git = "https://github.com/microsoft/windows-rs" And then in your build script you can simply generate what you need: fn main() {
println!("cargo:rerun-if-changed=build.rs");
windows_bindgen::bindgen([
"--out",
"src/bindings.rs",
"--config",
"flatten",
"--filter",
"Windows.Win32.Web.InternetExplorer.IDocObjectService",
])
.unwrap();
} I used a git dependency as this relies on a bug I just recently fixed: #2785 You'll notice that this generates a lot of code, which is why it is not included by default. |
Honestly, can't say that I like this. I thought the whole point of feature flags is that you use what you need only. But the other issue, which is probably bigger (since I now you provided a solution) , is that there are very little I would love to implement it and add to the examples if you can "mentor" how to get it done. |
What are you trying to do/port? |
We interact with an You can see my trials at: It contains a demo GUI to work on, can probably migrate that GUI to |
There are several COM samples (e.g., bits or spellchecker) that cover core COM principles. Except for obtaining an initial interface pointer, there is little variance in use across APIs, which I feel is sufficiently covered. There are, however, two common patterns that could receive some more attention:
Raymond Chen's A big little program: Monitoring Internet Explorer and Explorer windows, part 3: Tracking creation and destruction serves as a good starting point for deriving a sample that covers both areas. I would feel uneasy about adding a sample based on MSHTML. While the technology has served us well for years, it is past its prime. With everyone in such a hurry these days, visitors will forget to read what's written on the tin and copy-paste the first example that doesn't immediately crash. This isn't something we should be actively supporting. |
I have zero sentiments to MSHTML. I just need a way to query/create elements in an embedded Explorer GUI, I don't mind using a screwdriver or a hammer as long as it works :) I remember seeing pywinauto using Dispatch , I can see if their code can be ported to rust to achieve what I need. |
@ohaddahan The To manipulate the DOM you probably need at least an |
In my |
Closing as there's no work for the |
Summary
Trying to add
Win32_Web_MsHtml
to the features result in a compilation bug.While it's mentioned as required feature in some places:
windows-rs/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs
Line 661 in 1facf94
Crate manifest
Crate code
The text was updated successfully, but these errors were encountered: