Movatterモバイル変換
[0]ホーム
Returning objects from PythonCOM servers
Jesper Eskilsonjojo at virtutech.se
Fri Apr 6 05:12:17 EDT 2001
Mark Hammond <MarkH at ActiveState.com> writes:> I'm not exactly sure what you mean.Sorry, but I don't really know much about COM, except what I've read in thePythonCOM documentation. I was hoping to be able to fix this withoutdigging too deep into C++ and Visual Studio.So bear with me if I ask any obvious or stupid questions.> If you want to implement an interface described in a .tlb,> servers\test_pycomtest is the only example (and only in the latest> ActivePython, or win32all-138 and win32all-139)>> If you want to call an external object who's interface is described in a> type library and the object does not support IDispatch, you can not.The problem is this: I'm writing a COM-server in Python which implements aninterface. Some of the functions in the interface have, as parameters,datatypes defined in the type library. For example, from the IDL-file:// HRESULT GetTargetInfo ([out] PGLOBAL_TARGET_INFO_STRUCT pgti); PGLOBAL_TARGET_INFO_STRUCT is defined in the IDL-file as well. Now, howwould I implement this function? Somehow I would need to fill in thestructure PGLOBAL_TARGET_INFO_STRUCT and pass it back to the client, right?I got the impression that I could take a type-library, feed it to makepyand from there get access to PGLOBAL_TARGET_INFO_STRUCT as some form ofPython object which could be passed back to the client. By studying thetlbrowse.py application, I managed to extract some useful info from thetype library, but nothing that hinted how I could actually access theobjects themselves./Jesper-- -------------------------------------------------------------------------Jesper Eskilsonjojo at virtutech.seVirtutechhttp://www.virtutech.se-------------------------------------------------------------------------
More information about the Python-listmailing list
[8]ページ先頭