serious issue radform com visibility

7 posts, 0 answers
  1. Faheem Nadeem
    Faheem Nadeem avatar
    14 posts
    Member since:
    Jul 2009

    Posted 28 Aug 2009 Link to this post

    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!!!

  2. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 28 Aug 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Faheem Nadeem
    Faheem Nadeem avatar
    14 posts
    Member since:
    Jul 2009

    Posted 28 Aug 2009 Link to this post

    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!!!


  5. Faheem Nadeem
    Faheem Nadeem avatar
    14 posts
    Member since:
    Jul 2009

    Posted 29 Aug 2009 Link to this post

    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.
  6. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 31 Aug 2009 Link to this post

    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.
  7. Sutasinee
    Sutasinee avatar
    2 posts
    Member since:
    Nov 2007

    Posted 18 Jan 2010 Link to this post

    I have same problem. What is solution for this?
  8. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 18 Jan 2010 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready