Skip to content
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

Helper Implementations for COM Types #98

Closed
randomPoison opened this issue May 18, 2015 · 1 comment

Comments

@randomPoison
Copy link
Contributor

commented May 18, 2015

Winapi-rs has has support for COM types through manually declaring the vtable, but I've noticed that using these types is pretty nasty compared to doing so in C (see this example). This could be greatly simplified by adding an impl to the various COM types that wrap up the calls to the vtable functions. I've started implementing this on my fork (see this commit), but I wanted to get some feedback before making a pull request. Is this sort of change in line with the design ethos of winapi-rs? It seems like the idea is to only provide the C bindings to the Windows APIs, so this starts to go beyond that in providing a wrapper around the C bindings to provide a cleaner API. The reason I still think this is a good idea is that it recreates the C++ API that COM is supposed to have, which I would argue still adheres to the design ethos of winapi-rs.

Let me know what you think. If this seems like something worth doing I can make PRs as get things put together.

@retep998

This comment has been minimized.

Copy link
Owner

commented May 18, 2015

Not worth doing because that's a lot of typing.
What is worth doing is this: c51c581

@retep998 retep998 closed this May 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.