Menu

#99 Com Event out param support

closed-invalid
nobody
com (105)
5
2004-05-02
2004-04-29
No

I create simple Com class with events.
Event method has 2 out paramtrs.
What i write python code for this event?

[
uuid(A33DF825-B356-47A1-9350-8E8C08F255AF),
version(1.0),
helpstring("PyComTest Library")
]
library PyComTest
{
// Forward declare all types defined in this typelib
[
odl,
uuid(AD0FB21E-AAAA-4446-828A-804908F1FD82),
version(1.0),
helpstring("Dispatch interface for PyComTestClass
Object"),
dual,
oleautomation
]
interface IPyComTestClass : IDispatch {
[id(0x000000c9)]
HRESULT Method([in] BSTR Param1);
};

[
uuid(A5D193CC-C9AE-4094-966D-780762AD7AFA),
version(1.0),
helpstring("Events interface for PyComTestClass
Object")
]
dispinterface IPyComTestClassEvents {
properties:
methods:
[id(0x000000c9)]
HRESULT Method1([out] BSTR* Param1, [out]
int* Param2);
};

[
uuid(D8402621-208A-435B-B169-805526C01231),
version(1.0),
helpstring("PyComTestClass Object")
]
coclass PyComTestClass {
[default] interface IPyComTestClass;
[default, source] dispinterface
IPyComTestClassEvents;
};
};

Discussion

  • Mark Hammond

    Mark Hammond - 2004-05-02
    • status: open --> closed-invalid
     
  • Mark Hammond

    Mark Hammond - 2004-05-02

    Logged In: YES
    user_id=14198

    This looks like the PythonCOM test suite - if so, look for
    testpycomtest.py and testvb.py for code that uses it.

    You should write:

    param1, param2 = object.Method1()

     
MongoDB Logo MongoDB