Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Visio Exporter: No such interface supported (Read 7232 times)
Bas
YaBB Newbies
*
Offline



Posts: 36
Joined: Apr 14th, 2006
Visio Exporter: No such interface supported
Apr 18th, 2006 at 4:18am
Print Post  
Hi,

This morning I installed the Visio Exporter control in Delphi 2005. When calling ExportVDX(myFlowChartXCtrl, 'c:\test.vdx') an EOleException is raised stating "No such interface supported".

I checked if FcxVisioExport.vxt is in the same path as the executable, and it is.

What could be causing the problem here, and how can I fix this?

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Visio Exporter: No such interface supported
Reply #1 - Apr 18th, 2006 at 7:09am
Print Post  
Hi,

VisioExporter works only with the FlowChartX Pro edition. That error might happen if you try to use it with the standard edition of the control.

Stoyan
  
Back to top
 
IP Logged
 
Bas
YaBB Newbies
*
Offline



Posts: 36
Joined: Apr 14th, 2006
Re: Visio Exporter: No such interface supported
Reply #2 - Apr 18th, 2006 at 7:22am
Print Post  
I checked the type library, and it says (amongst other things):

// PASTLWTR : 1.2
// File generated on 14.4.2006 7:05:43 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\WINDOWS\system32\FlowChartPro.dll (1)
// LIBID: {69ECBBD3-5C2A-4A84-ABEC-23937DBF1B54}
// LCID: 0


So I am using the pro version as far as I can tell. I do however have both versions installed on the same machine.

Ill try unregister the non-pro version, see if that makes a difference.
  
Back to top
 
IP Logged
 
Bas
YaBB Newbies
*
Offline



Posts: 36
Joined: Apr 14th, 2006
Re: Visio Exporter: No such interface supported
Reply #3 - Apr 18th, 2006 at 7:27am
Print Post  
I uninstalled the non-pro version, and checked that the .dll file was removed.

Same exception however..
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Visio Exporter: No such interface supported
Reply #4 - Apr 18th, 2006 at 7:53am
Print Post  
This isthe only code in VisioExporter.Export() that can throw the exception

// QI for IFlowChart interface of passed DISPATCH
hr = lpFlowChartX->QueryInterface( __uuidof(FXChart::IFlowChart),(void**) &pChart);

if FAILED(hr)
  throw _com_error(hr);

If the Delphi IDispatch wrapper for the FlowChart class does not implement the raw IFlowChart interface, the QueryInterface call above will fail. If any member of the wrapper class gives you access to the internal raw IFlowChart or IUnknown pointer, try passing it to the exporter instead of the Delphi object.
  
Back to top
 
IP Logged
 
Bas
YaBB Newbies
*
Offline



Posts: 36
Joined: Apr 14th, 2006
Re: Visio Exporter: No such interface supported
Reply #5 - Apr 18th, 2006 at 8:46am
Print Post  
I passed the .DefaultInterface property as the first parameter which returns an IFlowChart..

.. et voila Grin

I dont understand why the queryInterface fails becuase in the TLB IFlowchart is defined like:

IFlowChart = interface(IDispatch)

If you want the generated TLB to play with let me know, and I can email it. Might be interresting.

Thanks for the solution!
  
Back to top
 
IP Logged
 
Bas
YaBB Newbies
*
Offline



Posts: 36
Joined: Apr 14th, 2006
Re: Visio Exporter: No such interface supported
Reply #6 - Apr 18th, 2006 at 9:07am
Print Post  
Btw, the same goes for the Visio importer, ofcourse.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Visio Exporter: No such interface supported
Reply #7 - Apr 18th, 2006 at 10:10am
Print Post  
Ok, that's great. The Export method takes an IDispatch pointer as argument and Delphi might pass an internal IDispatch implementation object that doesn't actually implement IFlowChart.

I don't know why Export doesn't take an IFlowChart argument. The Delphi wrapper object would probably work nice then.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint