How to use Pythonwin's ability to access windows dll's???

Robin Becker robin at jessikat.demon.co.uk
Sun Jan 16 03:41:20 EST 2000


In article <007701bf5fd4$4b1d4c60$01646464 at computer>, Neil Hodgson
<neilh at hare.net.au> writes
>> Seriously what is the purpose of the LoadLibrary function if not to
>> access Dll's>
>
>   One thing you can do is load DLLs that define window classes and then
>create windows of those classes. Then you send messages to those windows.
>This is how Scintilla is integrated into PythonWin.
>
>   I'd like to see calldll in the Python distribution rather than in
>PythonWin. Its only a very small wafer of code that provides access to all
>OS functionality. Most of my chain saw scars heal eventually anyway.
>
>   Neil
>
>
>

There are two more general libraries that could be used as the guts of
the calldll thing. There's libffi (from cygnus) and ffcall from Bruno
Haible, <haible at clisp.cons.org>. Both of these support multiple
platforms via a well defined api. Roger E Critchlow Jr recently provided
a Tcl interface for these, replacing an earlier calldll like thing which
I had hacked up a couple of years ago and which only worked on x86
(win32 & linux). The only serious disadvantage is that various C++
problems are likely to remain eg the name mangling is different for
different compilers (even on win32) and the this passing convention is
quite variable (often using a register).
-- 
Robin Becker



More information about the Python-list mailing list