[python-win32] win32com, pythoncom

Christophe Leske leske at online.de
Tue Aug 30 11:03:56 CEST 2005


ok,

so i wade through all the available documentation about this, but didn't 
find anything.

Does anyone know how one is supposed to implement an interface in 
PythonCom, or how to acquire one which is NOT immediately available from 
the control?

What i am after is a sample on how an interface which will be passed to 
another control is actually being implemented in Pythoncom. Since the 
interface is passed on to the other application/control/whatever, we 
need to pass something on - a pointer probably. How is this actually 
done? What about "standard" interfaces, like IUnknown, IDispatch, and so 
on, are these automatically provided by PythonCom?

And how about the other way round?

I got an activeX control here, which i can wrap using MakePy. I got a 
wrapper class for it, but i cannot get to the Interfaces i am supposed 
to acquire for the programming. I get to the Interfaces in order to 
register my control with the application, but then i need to get to 
OTHER interfaces in order to continue my work. Yet there is no such 
wrapped method or way to get to them, i already wade through the 
generated class.

If anyone wants to check out what i am talking about, get yourself the 
Google Desktop 2.0 SDK, and see the developer's forum on the site.


I can register my own, pythonmade control by the means of:

    reg = gds.GoogleDesktopRegistrar()

    compDesc = ["Title",TITLE, "Description",DESCRIPTION, "Icon",GDS_ICON]
    registration = reg.StartComponentRegistration(MYGUID, compDesc)

    registrar_progid="GoogleDesktop.DisplayPluginRegistration"
    registration=reg.GetRegistrationInterface(registrar_progid);

    registration.RegisterPlugin(MYGUID, 0)
    reg.FinishComponentRegistration();

Works fine.

But then what? Meaning, where is the flow of the application going? I 
guess that it tries to acquire an interface from my control, so i need 
to implement something for this - but what? A class? A method? How do i 
pass the interface on?

Thanks for any insights,
Christophe Leske



More information about the Python-win32 mailing list