This is a migrated thread and some comments may be shown as answers.

serious issue radform com visibility

6 Answers 163 Views
Form
This is a migrated thread and some comments may be shown as answers.
Faheem Nadeem
Top achievements
Rank 1
Faheem Nadeem asked on 28 Aug 2009, 08:17 AM
hi,
i am opening google maps in a  browser control in radform. for this i need to to set com visibilty to true to communicate with javascript in locally hosted web page.
my code :

using System.Runtime.InteropServices;
using System.Security.Permissions;

    // Make COM Visible to communication with other App
    [ComVisibleAttribute(true)]
    // Set Security Level to Full Trust inorder to enable external Javascript function invokes and data passing
    [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]

works perfect in simple .net forms
but gives error in rad form....
error:
A QueryInterface call was made requesting the default IDispatch interface of COM visible managed class 'TcpMappingServer.LivePlayAVL'. However since this class does not have an explicit default interface and derives from non COM visible class 'Telerik.WinControls.UI.RadForm', the QueryInterface call will fail. This is done to prevent the non COM visible base class from being constrained by the COM versioning rules.


Anysolution Please, ineed it quickly, if radform wont work will the shaped form work...
or any other solution with radform.
thanks in advance!!!

6 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 28 Aug 2009, 11:52 AM
Hi Faheem,

Thanks for contacting us.

Our assemblies have the default ComVisible attribute value set to false. This has been set as a default value for all .NET assemblies from .NET v2.0 since many issues with GUIDs and overhead interface data might occur when all assemblies are ComVisible by default.

However, we would like to take a look at your project and see what we can do to make it work. Therefore, I would like to ask you to send us a demo application that manages to reproduce the issue. You can do so in a new support ticket.
 
Thanks for your time.
 
Kind regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Faheem Nadeem
Top achievements
Rank 1
answered on 28 Aug 2009, 01:35 PM
thankyou for ure reply!!! I am attaching a support ticket soon
But the problem is really simple.

What i am trying to implement is, google maps running in a web browser control in a radform.
the google api functions are written in a locally hosted webpage, which is being navigated by the web browser control on the rad form.
passing of information between javascript and c#.net (as i want to pass some values to functions in javascript located in the navigated html file), requires me to set the com visibilty attribute  to true, so that javascript can be accessesd through c#.
Easy enough as i require only these two statements after my namespace. works flawlessly for my standard windows forms, but as i have already designed my whole forms in radforms, reverting back is a big issue :(. 
Hope you guys will find a olution to it soon!!!
Thanks again!!!


0
Faheem Nadeem
Top achievements
Rank 1
answered on 29 Aug 2009, 05:40 AM
my support ticket Id is
238788
Please help me with a solution to this problem urgently else i have to remove every form in my project to standards forms.
0
Deyan
Telerik team
answered on 31 Aug 2009, 02:22 PM
Hello Faheem Nadeem,

Please refer to the support ticket mentioned above.
 

All the best,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sutasinee
Top achievements
Rank 1
answered on 18 Jan 2010, 10:17 AM
I have same problem. What is solution for this?
0
Deyan
Telerik team
answered on 18 Jan 2010, 12:01 PM
Hello Sutasinee,

The solution of this case is to create a class which is ComVisible and reroute the method calls that come from the Web Browser to the API of this class. In this way you will not have to make RadForm ComVisible and also will not get the exception discussed here. I hope this helps.

All the best,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Steve
Top achievements
Rank 1
commented on 29 Sep 2021, 02:17 AM | edited

ignore
Steve
Top achievements
Rank 1
commented on 29 Sep 2021, 04:04 AM

pls ignore. i worked it out
Tags
Form
Asked by
Faheem Nadeem
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Faheem Nadeem
Top achievements
Rank 1
Sutasinee
Top achievements
Rank 1
Share this question
or