[python-win32] Re: CAPICOM on Vista 64

Roger Upole rwupole at msn.com
Wed Jul 16 04:43:18 CEST 2008


"Mark Hammond" <mhammond at skippinet.com.au> wrote in message
news:01a701c8e6de$e959be00$bc0d3a00$@com.au...
>> I'm using python 2.6b1.amd64 and pywin32-211.win-amd64 on my 64 bit
>> vista system. I am trying to access the CAPICOM COM library through
>> win32com.client. However, every time I try to load it through the
>> Dispatch method I get the following error:
>
> It appears that a 64bit version of that COM object has not been installed.
> On my Vista64 box I see the following:
>
> 32bit version of Python:
>
> | pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None,
> u'The
> Store object does not represent an opened certificate store.\r\n', None,
> 0,
> -2138570192), None)
>
> (ie, the object is installed - but for whatever reason it failed to be
> created)
>
> While the 64bit version of Python on the same box:
>
> | pywintypes.com_error: (-2147221164, 'Class not registered', None, None)
>
> (ie, object not registered)
>
> Sadly (but for good reason) COM doesn't provide interoperability between
> 64
> and 32 bit versions of COM objects.  Although it does allow both 32 and
> 64bit versions to be registered, this particular COM object doesn't take
> advantage of that.  Also somewhat sadly, Python has explicitly made the
> decision to *not* allow both 32 and 64bit versions to be installed on the
> same machine (although that does work fine once you arrange for them to
> both
> be installed)
>

As far as I can tell, they haven't released a 64-bit version of CAPICOM at
all.

What I've done is to create a COM+ application that runs in its own process
and exports the interfaces provided by CAPICOM.  This is fairly
straightforward using the Component Services snapin for MMC.

           Roger




More information about the python-win32 mailing list