CTypes, 64 bit windows, 32 bit dll

rdahlstrom roger.dahlstrom at gmail.com
Mon Mar 31 10:25:55 EDT 2008


On Mar 31, 10:22 am, rdahlstrom <roger.dahlst... at gmail.com> wrote:
> So I have a 64 bit Windows 2003 system, running python 2.5.1.1.
>
> I can import a Windows .dll (msvcrt or whatever) using ctypes, but
> when attempting to import another application-specific .dll (tibrv.dll
> if anyone is familiar with it), I receive the error WindowsError:
> [Error 193] %1 is not a valid Win32 application.
>
> I know there's a Windows on Windows (wow) which allows 32 bit
> processes to run on 64 bit windows - is there a way to work this in
> somehow?  Maybe I'm barking up the wrong tree?
>
> Code is simple, and works on 32 bit systems no
>
> from ctypes import *
> #this doesn't work
> tibrv = cdll.tibrv
> #this does work
> msvcrt = cdll.msvcrt

And by "works on 32 bit systems no", I mean "works on 32 bit systems
no problem."



More information about the Python-list mailing list