-
Notifications
You must be signed in to change notification settings - Fork 30
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
IWbemServices::ExecMethod support for WMIConnection #58
Comments
This can be related to #18, however I am approaching the design from a different aspect. Also after further work, I have managed to make basic method calls (such as |
Hi 🙂 I think that creating the initial safe and more Rust-y API is a great first step for this feature. A way to support out-params will also be interesting, maybe something like:
Where Some links for reference from MSDN: |
@Soul85 I see you did make progress in microsoft/windows-rs#2040, do you have some updates? |
@ohadravid I'm try to get such method calls to work in an iterative manner, first implementing one rust func for each method call, and then we'll see what can be done to build a rustified abstraction. But I admit not being accustomed to the Windows APIs does not make things easy. And the lack of access to previous Found this post which is quite didactic as to how things work in C, and borrowed from microsoft/windows-rs#2040. Also opened a feature request for a full Ongoing exploration work pushed to https://github.com/xcp-ng/xenstore-win/ |
Hi,
As this is intended to be an "all things WMI" sort of crate by the look of it, I would like to introduce the idea of implementing a high-level
ExecMethod
. It appears rather straightforward, requiring only a couple helper methods for obtaining the parameters a method requires and setting the properties for said parameters if they are classes.I propose a single exposed method,
execute_method
, which would take in an object path (strObjectPath: BStr
), method name (strMethodName: BStr
), potentially aHashMap<String, T>
or serialized class for parameters (pInParams: *mut IWbemClassObject
) and another potentialHashMap<String, Variant>
or serialized class for results (ppOutParams: &*mut IWbemClassObject
).Note: I am still by all means a beginner with Rust best practices. This example is most likely not the best way to go about this, I just wanted to bring this to attention and state that I am currently attempting to implement it as a side project.
The text was updated successfully, but these errors were encountered: