Anybody have any Python examples using COM? (re: IUnknown)
Posted: Thu Feb 10, 2011 2:45 pm
I'd like to write a simple plugin that allows switching of the default audio device using Vista and Windows 7.
This was easy to do under XP (using public API calls), but under Vista and Windows 7 it's hidden away in undisclosed DLLs.
Somebody reversed engineered the Windows control panel (sound manager) to find the calls so it's now possible to switch the default audio devices.
Anyways... the methods using COM and the interfaces inherit from IUnknown (not IDispatch).
Does anybody have any examples of doing this in Python? It looks like somebody wrote a Python package called Comtypes to accomplish this exact thing but I'm not sure what I would need to integrate this Python library into EventGhost. (I'm a .NET developer without a lot of experience with Python but if somebody could get me started with this I'm certain I could code the rest...)
This was easy to do under XP (using public API calls), but under Vista and Windows 7 it's hidden away in undisclosed DLLs.
Somebody reversed engineered the Windows control panel (sound manager) to find the calls so it's now possible to switch the default audio devices.
Anyways... the methods using COM and the interfaces inherit from IUnknown (not IDispatch).
Does anybody have any examples of doing this in Python? It looks like somebody wrote a Python package called Comtypes to accomplish this exact thing but I'm not sure what I would need to integrate this Python library into EventGhost. (I'm a .NET developer without a lot of experience with Python but if somebody could get me started with this I'm certain I could code the rest...)