activex in c# or vb6 ? RRS feed

  • Question

  • Hi,
    What' s the best way to  do an Activex ? 

    I read lot page in google and i read  activex are made in VB 6 generaly. What' s the most powerful. 

    I developped one activex in c# that´s make me a dll as if i ve created a windows control library. Is it more Secure un c# ? 

    Thanks for your response, 


    Tuesday, August 26, 2008 7:44 AM


  • I suspect that most ActiveX components are written in C/C++.  Microsoft's certainly are.  But yes, the equivalent of a .NET class library in VB6 was an ActiveX component.  They are easy to write in C# too, just turn the "COM Visible" property on in the project options.  To do it right, you need to deal with the drastic versioning problems in ActveX components.  Aka DLL Hell.  You must write an interface declaration for every publicly visible interface and give it a [Guid] attribute.  And change the Guid when you modify the interface.  And limit yourself to argument types that fit in a VARIANT.

    ActiveX is rapidly disappearing.  Good riddance.  Their only claim to fame is that they made Java possible.  And a string of security disasters, of course.

    Hans Passant.
    Tuesday, August 26, 2008 11:29 AM