Why LicenseException? (OT)

A

Armin Zingler

Hi,

this is a kinda OT question, but as I didn't get an answer in a Framework
group, I try it here because it's very urgent.

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
 
F

Family Tree Mike

I had a very similar problem with the MSChart control. There was some
registry setting that got arround the issue. If it is this control I can
try and dig up the solution.
 
A

Armin Zingler

Family Tree Mike said:
I had a very similar problem with the MSChart control. There was
some registry setting that got arround the issue. If it is this
control I can try and dig up the solution.


Thanks a lot for your quick answer. Did you also have the problem on your
development machine? Which registry entry was it? I know there's a .reg file
if the old controls are used, but that's only for development usually.
It's the Farpoint Spreadsheet control. I know there's a .Net version but the
AX version still works (on my dev machine and on the unmanaged forms in the
same process on my customer's machine).

Armin ['are-mean]
 
F

Family Tree Mike

Yes, we had a problem on some development machines too. Simply registering
the OCX didn't fix things. I'll find the link that got us going on that
control. Maybe there is a clue for your situation within it. I'll post
back shortly....


Armin Zingler said:
Family Tree Mike said:
I had a very similar problem with the MSChart control. There was
some registry setting that got arround the issue. If it is this
control I can try and dig up the solution.


Thanks a lot for your quick answer. Did you also have the problem on your
development machine? Which registry entry was it? I know there's a .reg
file
if the old controls are used, but that's only for development usually.
It's the Farpoint Spreadsheet control. I know there's a .Net version but
the
AX version still works (on my dev machine and on the unmanaged forms in
the
same process on my customer's machine).

Armin ['are-mean]
 
F

Family Tree Mike

I'm pretty sure this link, method two, was how we got things moving. I hope
this helps somehow as it is not exactly the same situation, but sounds
close.

http://support.microsoft.com/kb/318597/en-us


Armin Zingler said:
Family Tree Mike said:
I had a very similar problem with the MSChart control. There was
some registry setting that got arround the issue. If it is this
control I can try and dig up the solution.


Thanks a lot for your quick answer. Did you also have the problem on your
development machine? Which registry entry was it? I know there's a .reg
file
if the old controls are used, but that's only for development usually.
It's the Farpoint Spreadsheet control. I know there's a .Net version but
the
AX version still works (on my dev machine and on the unmanaged forms in
the
same process on my customer's machine).

Armin ['are-mean]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top