Re: ctypes.CDLL("") fails on MS Windows
Jacob Schmidt <[email protected]> Tue, 3 Jan 2012 21:55:10 -0500
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
On Windows, you can use something like this:
> exe = ctypes.CDLL("myprocess",
> ctypes.windll.kernel32.GetModuleHandleA(None))
>
> to get the current process. However, I'm not sure if this makes
> sense: an exe cannot export functions.
>
Where did you hear that from Thomas? The PE format applies to both exe
and dlls, both can import and export functions.
Jacob Schmidt
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox