Creating COM server Events?

Roger Upole rupole at hotmail.com
Thu Mar 30 03:15:46 EST 2006


You'll need to implement the IConnectionPoint and
IConnectionPointContainer interfaces with your server.
See \win32com\demos\connect.py and
\win32com\server\connect.py for some sample code.

       Roger

"Dan" <danbrwn at gmail.com> wrote in message news:1143651967.693545.40010 at i40g2000cwc.googlegroups.com...
>I have need to create a com server that will fire events back to
> clients. I have looked at some of the documentation and I am new to
> Python so cant quite get it. I have created an IDL file of the
> interfaces. Can someone tell me approximately what needs to be done
> here. I have seen examples of implementing the regular interfaces but
> don't know what to do about the events interfaces.The vid...Events
> interface is the main question here. In regular com development you
> would implement something along the lines of Fire_OnNewData(). My Com
> developement has mostly been with Borland tools and they do quite a bit
> for you, As I hope Python will. Heres the IDL:
>
> [
>  uuid(B0ADD4E1-1793-4089-8298-20B5A2DB0E82),
>  version(1.0),
>  helpstring("vidVisPython Library")
>
> ]
> library vidVisPython
> {
>
>  importlib("stdole2.tlb");
>
>  [
>    uuid(E26E3023-4F65-4E3D-A900-56C6302CD4E0),
>    version(1.0),
>    dual,
>    oleautomation
>  ]
>   interface IVideoVisitationPython: IDispatch
>  {
>    [
>    id(0x00000001)
>    ]
>    HRESULT _stdcall AdviseNewData( void );
>  };
>
>  [
>    uuid(50A02634-215F-47C6-9749-CDD02DC99B13),
>    version(1.0)
>  ]
>   dispinterface IVideoVisitationPythonEvents
>  {
>    properties:
>    methods:
>    [
>    id(0x00000001)
>    ]
>    HRESULT OnNewData( void );
>  };
>
>  [
>    uuid(134821F5-35B9-4917-B6EE-EF5C508BE949),
>    version(1.0)
>  ]
>  coclass CoVideoVisitationPython
>  {
>    [default] interface IVideoVisitationPython;
>    [default, source] dispinterface IVideoVisitationPythonEvents;
>  };
>
> };
> 




----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



More information about the Python-list mailing list