CTypes, 64 bit windows, 32 bit dll

rdahlstrom roger.dahlstrom at gmail.com
Tue Apr 1 06:52:27 EDT 2008


On Apr 1, 2:03 am, Tim Roberts <t... at probo.com> wrote:
> rdahlstrom <roger.dahlst... at gmail.com> wrote:
> >On Mar 31, 12:53 pm, "mimi.vx" <mimi... at gmail.com> wrote:
> >> On Mar 31, 4:22 pm, 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?
> >>...
>
> >> all dlls and python must be 32bit or 64bit, no mixed ...
>
> >Crap, no way to make a 32 bit load, even using the wowexec?
>
> No.  In Win64, a process is either entirely 32-bit, or entirely 64-bit.  To
> do the kind of crossing you seek, you would need to create a separate
> process for the 32-bit DLL and use interprocess communication.
> --
> Tim Roberts, t... at probo.com
> Providenza & Boekelheide, Inc.

Shoot.  Alright, thanks for your help.  I guess I'll have to roll out
a 64-bit version of the tibco software.



More information about the Python-list mailing list