HI All--
I jave a html page that embeds the Visio Drawing Control as follows

<OBJECT
ID="VisOCX"
CLASSID="CLSID:E4615FA3-23B0-4976-BD3E-D611DDBE330E"
WIDTH="100%"
HEIGHT="100%"
runat="server" >

<PARAM NAME="NegotiateMenus" VALUE="1">
<PARAM NAME="NegotiateToolbars" VALUE="1">
<PARAM NAME="PageSizingBehavior" VALUE="1">
<PARAM NAME="Src" VALUE="D:\scratch\test1.vdx">

</OBJECT>


I have a java script in this HTML as follows

<SCRIPT type= "text/javascript">

function GetVisioOCX() {
return VisOCX;
}

</SCRIPT>


I am opening this HTML using SWT Browser control. Once the document load is completed I want to execute this Java script and get the instance of Visio Drawing control.

I am using Browser.evaluate("return GetVisioOCX()") to invoke this java script.

I am getting following error org.eclipse.swt.SWTException: Return value not valid . I guess this means that return value cannot be converted to Java object and hence this error.

Is there any way I can get the instance of Drawing control by overriding some COM call or some tweaking in COM call?

I appreciate your time.

Thanks