Python bindings tutorial

Tim Roberts timr at probo.com
Fri Mar 19 05:13:25 CET 2010


Dave Angel <davea at ieee.org> wrote:
>>
>There's no real reason parts of an exe cannot be exported, same as a 
>dll.  They are in fact the same structure.  And in fact many other files 
>in the Windows environment are also the same structure, from fonts to ocx's

Well, there IS a fundamental difference.  EXEs and DLLs and the like do all
have the same format.  They all have a "transfer address", where execution
begins.  That's the key problem.  With a DLL, the transfer address goes to
a DllMain, where certain DLL initialization is done, preparing the other
entry points for use.  With an EXE, the transfer address goes to "main".

So, when you load an EXE as a DLL, you will be RUNNING the program.  That's
is usually not what you want.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list