> Unfortunately got the same error ('Invalid class string') with
> 'pywintypes.IID("{...
That is strange - it appears the object itself is throwing that error code.
E_NOINTERFACE is generally the only "expected" error code for QI.
> You mention not supporting IDispatch but this interface inherits
> IDispatch. Here is a snippet from it's IDL:
>
> [
> odl,
> uuid(8D2AD79B-1ADD-4181-BAD4-FF0672A9B6E3),
> version(1.0),
> dual,
> nonextensible,
> oleautomation
> ]
> interface IViewDataView : IDispatch {
>
> [id(0)] HRESULT GetDataSet([out,retval] long*);
> ...
>
> Isn't that the same thing?
It is - so I've no idea what the problem is :(
Mark
>
> Jose
>
> On Sun, Apr 27, 2008 at 11:53 AM, Mark Hammond
> <[EMAIL PROTECTED]> wrote:
> > > Hi Mark,
> > >
> > > Thanks for the answer, I tried using the IViewDataView's uiid like
> > > this (probably in a naive way):
> > >
> > > y = view.QueryInterface("{8D2AD79B-1ADD-4181-BAD4-FF0672A9B6E3}")
> > >
> > > But that produces the error on that line.
> > >
> > > com_error: (-2147221005, 'Invalid class string', None, None)
> >
> > Hrm - try passing 'pywintypes.IID("{8D2AD79B-1ADD-4181-BAD4-
> FF0672A9B6E3}")'
> > as the IID.
> >
> > > I read that I can do the same thing with win32com (without using
> > > comtypes) but for that I would need to somehow add my custom
> interface
> > > to it. I also read that exist tools to automate this process but so
> > > far I could not find them. Where should I start?
> >
> > Yeah - if the interface doesn't support IDispatch, your best bet is
> indeed
> > comtypes. The code as it stands, once you sort out the simple
> issues, is
> > likely to end up with an E_NOINTERFACE exception :(
> >
> > Mark
> >
> >
> _______________________________________________
> python-win32 mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32