Python COM and bitmap Resource ID's

Markus Wankus markus_wankus at hotmail.com
Sun Jan 12 21:16:44 EST 2003


On Sun, 12 Jan 2003 23:14:02 GMT, Mark Hammond <mhammond at skippinet.com.au> 
wrote:

> I think you will be pushing poo uphill here.  You pass the resource ID to 
> the app, but how do you pass the DLL handle or filename?  Would it be 
> possible to create a DLL with nothing but resources?
>

Well, normally, creating an "addin" for this software package is done 
through a .dll only, so it is taking the the resource ID of the addin which 
made the connection.  I happen to be doing this with COM and Python, so 
there is my problem.  I can only assume it would be trying to use the 
pythoncom22.dll in my case.  Perhaps I could add some bitmap resources to 
it with a resource hacker?

There is a function to call before you can do anything useful (called 
SetAddinCallbackInfo) where you specify the handle and object which will be 
providing the functions for any toolbar or menu events.  I am passing my 
own Python COM object to this, and sucessfully getting the callbacks to 
execute my Python code.  This is probably where it is looking for resources 
as well, and eventually getting to pythoncom22.dll I would imagine.

> Note that win32ui.pyd does have bitmap resource in it, so if you can work 
> out how it works out what DLL it uses, you could first experiment with 
> this.

Hmm...I'm not sure this will help - but I will continue to dick around.  I 
usually spend most of my time pushing the proverbial 'poo' uphill, and 
eventually realize how obvious the answer is when I do figure out a 
solution....  Thanks for the reply!

-- 
Markus




More information about the Python-list mailing list