ActiveX Questions

Karl M. Syring syring at email.com
Tue Feb 12 09:29:52 EST 2002


"Chris Gonnerman" <chris.gonnerman at newcenturycomputers.net> schrieb im
Newsbeitrag news:mailman.1013521581.26252.python-list at python.org...
> ----- Original Message -----
> From: "Karl M. Syring" <syring at email.com>
>
>
> > "Chris Gonnerman" <chris.gonnerman at newcenturycomputers.net> schrieb
> > >
> > > The control is called "REPORTOCX.ReportOcxCtrl.1" (why does the name
> > > have to be such a pain to find?)  I can instantiate it:
> > >
> > > >>> o = win32com.client.Dispatch("REPORTOCX.ReportOcxCtrl.1")
> > > >>>
> > >
> > > (I'm running 2.1.2 btw.)  When I try to use it's methods all I get is:
> > >
> > > >>> o.AboutBox()
> > > Traceback (most recent call last):
> > >   File "<interactive input>", line 1, in ?
> > >   File
"win32com\gen_py\E80AB8D2-EB1E-49EE-8C2A-57BB2E70302Ax0x1x0.py",
> > line
> > > 29, in AboutBox
> > >     return self._oleobj_.InvokeTypes(0xfffffdd8, LCID, 1, (24, 0),
(),)
> > > com_error: (-2147418113, 'Unexpected failure', None, None)
> > > >>>
> >
> > Looks like it is missing a DLL, probably one of MFC's (If it is on a
bare
> > bones Win95, there are more interesting modes of failure). Can't you
> > inspect, what your OCX is trying to import?
>
> Ur.  What's the Win32 equivalent of ldd (dumps linked dll's)?  I ran
strings

The canonical command is
Dumpbin /imports

> on it and filtered out the .dll files (case-insensitive match) and came up
> with this:
>
> MFC42.DLL    <- got that
> MSVCRT.dll   <- got that
> KERNEL32.dll <- got that (system wouldn't run without it, right?)
> USER32.dll   <- ditto
> GDI32.dll    <- ditto
> OLEAUT32.dll <- got that
> What might I be missing?
>
> I tried some other ActiveX controls with reasonable success, but a few
> showed
> the same error message.

Copying dlls is not recommended, because of possible additional
dependencies. There is a VC runtime installer called vcredist.exe that you
can scrap from msdn.microsoft.com.
If the going really gets tough, especially with old Win9x systems, I always
recommend to install IE 5.5, even if you never use it.

Karl M. Syring
Karl M. Syring




More information about the Python-list mailing list