M
MRUTYUNJAYA.M
Guest
I have developed one ActiveX control using C# Winform. I need to use that ActiveX control in VC++. following are code snippet for C# ActiveX Control
[ProgId("Activex.UserCtrl")]
[ClassInterface(ClassInterfaceType.AutoDispatch), ComSourceInterfaces(typeof(UserControlEvents))]
[ComVisible(true)]
public partial class UserCtrl : UserControl
{
[ComVisible(true)]
public string Textbox1
{
get
{
// ptextVal = (int)(numericUpDown1.Value);
return textBox1.Text;
}
set
{
textBox1.Text = value;
//numericUpDown1.Value = ptextVal;
}
}
I am not able to export methods or properties into VC++ from C# ActiveX Control. As per above code, I should be able to export above property.
if I am declaring [ClassInterface(ClassInterfaceType.AutoDual), then I am getting lot of compilation error while compiling C# ActiveX Control.
How can access exported methods or properties in VC++ if [ClassInterface(ClassInterfaceType.AutoDispatch)..??
Am I doing anything wrong in exporting methods or properties from C# ActiveX Control..??
Mrutyunjaya
Continue reading...
[ProgId("Activex.UserCtrl")]
[ClassInterface(ClassInterfaceType.AutoDispatch), ComSourceInterfaces(typeof(UserControlEvents))]
[ComVisible(true)]
public partial class UserCtrl : UserControl
{
[ComVisible(true)]
public string Textbox1
{
get
{
// ptextVal = (int)(numericUpDown1.Value);
return textBox1.Text;
}
set
{
textBox1.Text = value;
//numericUpDown1.Value = ptextVal;
}
}
I am not able to export methods or properties into VC++ from C# ActiveX Control. As per above code, I should be able to export above property.
if I am declaring [ClassInterface(ClassInterfaceType.AutoDual), then I am getting lot of compilation error while compiling C# ActiveX Control.
How can access exported methods or properties in VC++ if [ClassInterface(ClassInterfaceType.AutoDispatch)..??
Am I doing anything wrong in exporting methods or properties from C# ActiveX Control..??
Mrutyunjaya
Continue reading...