[python-win32] Marking a Python COM server safe for InternetExplorer

Mark Hammond mhammond at skippinet.com.au
Wed Aug 11 09:14:24 CEST 2004


> Help.
>
> I've seen this subject in the archives, but I
> don't understand any solution for this.
>
> Implementing IObjectSafety sounds groovy, but I
> need help with how to do this.
>
> Mark Hammond <MarkH at ActiveState.com> wrote, in part:
> > [T]he win32com.axscript.axscript module supports IObjectSafety.
> > Once you import this module any Python COM object can implement
> > this interface like any other.

Start by creating a standard COM object, but register it for debugging.
Test it out.  If one of the last messages you see relates to a failed QI for
IID_IObjectSafety, then you can implement this interface just like you would
any other non-Dispatch based interface - ie, add it to "_com_interfaces_",
add the methods to _public_methods_, and implement them!  The debug output
should then show the QI succeed, then the methods being called.

> We run IIS 5 for an internal site.  I want to
> install Python Com servers that the Vbscript
> developers can use.

If they are calling it from ASP, then there should be no need to implement
this interface.  Any COM object should work.  AFAIK, there is only an issue
when trying to run it on the client.

Mark.



More information about the Python-win32 mailing list