[python-win32] Communicating symbols between extension modules
Mark English
Mark.English at liffe.com
Wed Jan 14 10:41:08 EST 2004
Sorry, I didn't realise the two libraries were both written by you. That
does simplify things.
If exporting functions from one (_Cm.pyd) and importing them in the
other (_Qt.pyd) is an option, then you can link one (_Qt.pyd) to the
other (_Cm.pyd), which in msdev is known as creating a dependency, and
then just call the _Cm.pyd code as though it were part of _Qt.pyd. In
that sense, this is nothing to do with python - it's the standard way of
exporting symbols from a dll and using them in another project (static
linking). Static linking has some code maintenance and speed advantages
over dynamic linking (dynamic linking is using LoadProcess,
GetProcAddress).
If you still need to call "LoadProcess()" and _Cm.pyd isn't in your path
anyway, you can find out the path of your current module (_Qt.pyd) by
calling "GetModuleHandle()" and then "GetModuleFileName()".
Hope that all helps.
Cheers,
mE
-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely
for the intended addressee(s). Unauthorised reproduction, disclosure,
modification, and/or distribution of this email may be unlawful. If you
have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary companies.
-----------------------------------------------------------------------
More information about the Python-win32
mailing list