Can i migriate acitvex to .Net ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all:
i have these activex source codes, and can i migriate them to .Net 2.0?
and how?
Further more , in VS2005, can i create project like activex?

thanks any reply in advanced.

DingLi
 
It is relatively easy to make a component written in C# into an activex
component. Do some research in the following items

[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IFlowViewCtrlEvents
{
// called when a new step is selected
[DispId(1)] void StepSelected(string StepName);
}

[ComVisible(true)]
[SuppressUnmanagedCodeSecurityAttribute] // Allow calls out to AX
container without stack walk
[ClassInterface(ClassInterfaceType.AutoDual)] // expose this class as
the default interface
[ComSourceInterfaces(typeof(IFlowViewCtrlEvents))] // expose this event
interfaces
public class FlowViewControl : System.Windows.Forms.UserControl,
interop.hwdatadestination.IHwPropCollApp
{
}

gacutil
regasm

The component must be strongly keyed and registered in the GAC. Any
referenced assembly must also be keyed and registered in the GAC.

Hope this helps
Leon Lambert
 
Back
Top