Re: [python-win32] QueryInterface fails with object passed from VB

2008-04-28 Thread jose simas
No worries Mark, many thanks for your help. I am using the default interface instead which works perfectly. Going through the custom interface would make the code cleaner but I am happy to live with this if that means I can use python in the backend :-) I will post here if I find the answer. Have

Re: [python-win32] QueryInterface fails with object passed from VB

2008-04-27 Thread Mark Hammond
> 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

Re: [python-win32] QueryInterface fails with object passed from VB

2008-04-27 Thread jose simas
Unfortunately got the same error ('Invalid class string') with 'pywintypes.IID("{... 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, nonextensibl

Re: [python-win32] QueryInterface fails with object passed from VB

2008-04-27 Thread Mark Hammond
> 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

Re: [python-win32] QueryInterface fails with object passed from VB

2008-04-27 Thread jose simas
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) I read that I can

Re: [python-win32] QueryInterface fails with object passed from VB

2008-04-27 Thread Mark Hammond
> import comtypes.gen.ResultsInterfaces as ResInt > internalView = view.QueryInterface(ResInt.IViewDataView) ResInt.IViewDataView needs to be converted to either a pywintypes IID object, or a string in {xxx-xxx-etc} format - but I'm not sure how to convert between comtypes IIDs and

[python-win32] QueryInterface fails with object passed from VB

2008-04-25 Thread jose simas
Hi, I am porting parts of a large VB application to python (using 2.5) where the UI must stay in VB for the moment. I am using the Model View Presenter where my models and presenters are in python and my view is in VB. I am having trouble passing the VB views into my python presenters. The views