none
How to get Metadata of a ActiveX control on fly in C#? RRS feed

  • Question

  • I am facing problem in getting metadata(like properties,Events and methods) of a ActiveX controls on fly from a web page(using <OBJECT> tag and ActiveXObject or CreateObject), just by giving its ClassID or ProgramID using C# or C++.

    Is there any standard way to get meta data of a activex control present in a web page using C# and C++?

    Actually i am working for a product based company. The product on which i am working has a feature of Web automation, Currently our product has no capability of automating Activex controls present in a web page. We are enhacing our product to have this support.

    i am doing research on this and stucked up at this point of getting meta data of a ActiveX control. I need meta data to know its list of attributes,methods and events, which will help in automating the activex control.

    Help me in solving this issue, provide me if any sample code or examples avaialble Or  provide me links to refere.

    Regards

    Kasi

     

     

     

     

     

     

     

     

     

     

    • Moved by Figo Fei Monday, October 18, 2010 5:50 AM (From:Visual C# Language)
    Monday, October 11, 2010 9:05 AM

Answers

  • Am 11.10.2010 11:05, schrieb ModaliKasi:

    I am facing problem in getting metadata(like properties,Events and methods) of a ActiveX controls on fly from a web page(using<OBJECT>  tag and ActiveXObject or CreateObject), just by giving its ClassID or ProgramID using C# or C++.

    Is there any standard way to get meta data of a activex control present in a web page using C# and C++?

    Actually i am working for a product based company. The product on which i am working has a feature of Web automation, Currently our product has no capability of automating Activex controls present in a web page. We are enhacing our product to have this support.

    i am doing research on this and stucked up at this point of getting meta data of a ActiveX control. I need meta data to know its list of attributes,methods and events, which will help in automating the activex control.

    Help me in solving this issue, provide me if any sample code or examples avaialble Or  provide me links to refere.

    Regards

    Kasi

    IDispatch has its GetTypeInfoCount and GetTypeInfo methods
    that returns the count (actually 0 or 1) of TypeInfos
    associated to disp-interface and the ITypeInfo interface-pointer
    itself.
    The latter will expose all the desired information.
    Afaics all ActiveX is IDispatch based.

    Sorry for the reply not being to .NEttish but the issue
    itself is actually kind of pre-.NET.

    There also is a .NET tool that will convert and export
    ActiveX-typelib metadata into assemblies:

    see: Tlbimp.exe (Type Library Importer)
    <URL:http://msdn.microsoft.com/en-us/library/tt0cf3sx%28v=VS.100%29.aspx>

    MSDN also used to provide a COM-Tool for download that
    put some ease around the ITypeInfo interface which was called
    'TypeLib Information Object Library' I believe,
    it has aggregated into the "Visual Studio Tools for Applications 2.0"
    namespaces in .NET.

    <URL:http://msdn.microsoft.com/en-us/library/cc175109%28v=VS.90%29.aspx>     Chris

    • Marked as answer by eryang Tuesday, October 19, 2010 12:09 AM
    Monday, October 11, 2010 9:51 AM

All replies

  • Am 11.10.2010 11:05, schrieb ModaliKasi:

    I am facing problem in getting metadata(like properties,Events and methods) of a ActiveX controls on fly from a web page(using<OBJECT>  tag and ActiveXObject or CreateObject), just by giving its ClassID or ProgramID using C# or C++.

    Is there any standard way to get meta data of a activex control present in a web page using C# and C++?

    Actually i am working for a product based company. The product on which i am working has a feature of Web automation, Currently our product has no capability of automating Activex controls present in a web page. We are enhacing our product to have this support.

    i am doing research on this and stucked up at this point of getting meta data of a ActiveX control. I need meta data to know its list of attributes,methods and events, which will help in automating the activex control.

    Help me in solving this issue, provide me if any sample code or examples avaialble Or  provide me links to refere.

    Regards

    Kasi

    IDispatch has its GetTypeInfoCount and GetTypeInfo methods
    that returns the count (actually 0 or 1) of TypeInfos
    associated to disp-interface and the ITypeInfo interface-pointer
    itself.
    The latter will expose all the desired information.
    Afaics all ActiveX is IDispatch based.

    Sorry for the reply not being to .NEttish but the issue
    itself is actually kind of pre-.NET.

    There also is a .NET tool that will convert and export
    ActiveX-typelib metadata into assemblies:

    see: Tlbimp.exe (Type Library Importer)
    <URL:http://msdn.microsoft.com/en-us/library/tt0cf3sx%28v=VS.100%29.aspx>

    MSDN also used to provide a COM-Tool for download that
    put some ease around the ITypeInfo interface which was called
    'TypeLib Information Object Library' I believe,
    it has aggregated into the "Visual Studio Tools for Applications 2.0"
    namespaces in .NET.

    <URL:http://msdn.microsoft.com/en-us/library/cc175109%28v=VS.90%29.aspx>     Chris

    • Marked as answer by eryang Tuesday, October 19, 2010 12:09 AM
    Monday, October 11, 2010 9:51 AM
  •  

    We temporarily mark a reply, please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, October 19, 2010 12:09 AM