A
Armin Zingler
Hi,
I've written a managed Dll (in VB 2003) that offers features via COM
interop. I also have a client Exe written in VB6. The Exe calls a method in
the assembly which shows a System.Windows.Forms.Form modally. The Form
contains an ActiveX control. The same control is used by the same Exe in
some of it's (unmanaged) VB6 Forms without a problem.
My problem is, whenever the managed Form is shown, I get a LicenseException
("You do not have a license to use this ActiveX control"). Callstack:
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at MyForm.InitializeComponent()
at MyForm..ctor()
...
The problem does _not_ occur on the development machine. It's only there on
my customer's machine. He does not have a problem using the VB6 Forms
containing the same control in the same Exe, only whenever the managed Form
is to be shown. Therefore, I think this is not really a license problem.
Must be a problem using such an ActiveX control on a managed Form (thus, I
chose this group) but I have no idea how to solve it.
I read about component authoring and how to create a license for your own
controls, but that's not really the case here.
http://msdn.microsoft.com/en-us/library/fe8b1eh9.aspx
The page says that the licensing model also supports ActiveX controls,
however I don't know what goes wrong here.
Anybody's got a clue what to do?
Armin
I've written a managed Dll (in VB 2003) that offers features via COM
interop. I also have a client Exe written in VB6. The Exe calls a method in
the assembly which shows a System.Windows.Forms.Form modally. The Form
contains an ActiveX control. The same control is used by the same Exe in
some of it's (unmanaged) VB6 Forms without a problem.
My problem is, whenever the managed Form is shown, I get a LicenseException
("You do not have a license to use this ActiveX control"). Callstack:
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at MyForm.InitializeComponent()
at MyForm..ctor()
...
The problem does _not_ occur on the development machine. It's only there on
my customer's machine. He does not have a problem using the VB6 Forms
containing the same control in the same Exe, only whenever the managed Form
is to be shown. Therefore, I think this is not really a license problem.
Must be a problem using such an ActiveX control on a managed Form (thus, I
chose this group) but I have no idea how to solve it.
I read about component authoring and how to create a license for your own
controls, but that's not really the case here.
http://msdn.microsoft.com/en-us/library/fe8b1eh9.aspx
The page says that the licensing model also supports ActiveX controls,
however I don't know what goes wrong here.
Anybody's got a clue what to do?
Armin