[python-win32] Problem using win32com.client.Dispatch on Win7 64bit

Mark Hammond skippy.hammond at gmail.com
Fri Oct 15 01:09:50 CEST 2010


On 15/10/2010 3:40 AM, Eileen Wei wrote:
> Hi everyone,
>
> I am new to this group. I am not sure how to do search on the archives
> so if my question is duplicate please forgive me J
>
> I have Python 2.7.amd64 and pywin32-214.win-amd64-py2.7 installed on my
> Win7 64bit machine.
>
> I am trying to use a COM object (the source of the COM is in C++ and
> MFC) in my python script. I registered the dll and tried to create a
> object and here is what I got:
...
> Note that I was able to successfully creating the object in my WinXP and
> Win7 32bit machine. So I am thinking the problem must be related to
> 64bit somehow. How can I fix this?

64bit processes can't use 32bit COM objects (at least not in-proc - not 
sure about external) and I guess your COM object is 32 bit.

The easiest answer is probably just to install the 32bit Python and 
32bit pywin32 extensions - you can either leave or remove the 64bit 
version - they can co-exist happily...

Cheers,

Mark


More information about the python-win32 mailing list