"Class is not licensed for use"

  • Thread starter Thread starter Tiffiny
  • Start date Start date
T

Tiffiny

Hi Everyone,

I'm trying to develop a device plug-in , which will instantiate
the device specific dll and load in to the system.as example
I have barcode device and I wrote the wrapper class for the vendor specific
dll with the device specific configuration.Then in the device registering
program[part of my application] will read the those dll in specific folder
and then create the instances of each dll file in the given folder as given
below.

newDevice.Instance =
(IDevice)Activator.CreateInstance(DeviceAssembly.GetType(DeviceType.ToString
()));

Here IDevice is Interface that use for all device.

But following exception has thrown when trying to execute above line.

" Exception has been thrown by the target of an invocation."

When I check the message of inner exception of the above exception , it says

"Class is not licensed for use "

When I went further I found that exception actually thrown by the following
code line

MSCommLib.MSCommClass mPort=new MSCommLib.MSCommClass();


I did my best to figureout this.So if anyone tell me what should I do to
overcome this.

I'm using

MS Windows 2000 Server
..NET Framework 1.1
msomm32.ocx [ version 6.0.81.69]


Any Ideas ?
 
Tiffiny said:
Hi Everyone,

I'm trying to develop a device plug-in , which will instantiate
the device specific dll and load in to the system.as example
I have barcode device and I wrote the wrapper class for the vendor specific
dll with the device specific configuration.Then in the device registering
program[part of my application] will read the those dll in specific folder
and then create the instances of each dll file in the given folder as given
below.

It sounds like you need to pay the 3rd party to use their dll. if you've
already done so, there's a problem with thier licencing setup and you should
contact their support people to resolve the issue.
 
Hi Dan,
Thank you very much for ur valuable time.But the exception thrown
by the following line of code within the wrapper class.

MSCommLib.MSCommClass mPort=new MSCommLib.MSCommClass();

This is COM component and it's appear to be it's not registered well.So that
the License information of that is not in the registery.I used
regsvr32 command to register it.But I'm not sure that it is the correct way
to do it. Is there any other specific way to register COM component
in local system ?

Thank you ,

Sumeda Herath


Dan Neely said:
Tiffiny said:
Hi Everyone,

I'm trying to develop a device plug-in , which will instantiate
the device specific dll and load in to the system.as example
I have barcode device and I wrote the wrapper class for the vendor specific
dll with the device specific configuration.Then in the device registering
program[part of my application] will read the those dll in specific folder
and then create the instances of each dll file in the given folder as given
below.

It sounds like you need to pay the 3rd party to use their dll. if you've
already done so, there's a problem with thier licencing setup and you should
contact their support people to resolve the issue.
 

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

Back
Top