Login  
Search All Forums
Dart Home | PowerTCP Telnet for .NET | Custom Development Reply | PowerTCP Telnet for .NET Topics | Forums   
AuthorForum: PowerTCP Telnet for .NET
Topic: License Exception with C++ .net project
jarirfadlullah
jarirfadlullah@yahoo.com

From: Hillsboro, OR USA
Posts: 1
Member Since: 07/06/06
posted July 7, 2006 1:09 AM

Hi, I am using the PowerTCP Telnet to write a simple VC++ .net project. The PowerTCP telnet tool I am using for this is trial version. But I have to incorporate PowerTCP Telnet later on into a bigger c++ .net project, on a machine that has the licensed version of the tool.

I have alredy added the licenses.licx file to the project with the line:
Dart.PowerTCP.Telnet.Telnet, Dart.PowerTCP.Telnet

The cpp file has:

using namespace Dart::PowerTCP::Telnet;

and inside the void main() function, it has:

Dart::PowerTCP::Telnet::Telnet * telnet1 = new Dart::PowerTCP::Telnet::Telnet();

so on...

What happens is that the code does compile, but when debugging, it throws a License exception as soon as it tries to execute the declaration in the line shown above. The exception says:

An unhandled exception of type 'System.ComponentModel.LicenseException' occurred in dart.powertcp.telnet.dll

Additional information: This PowerTCP product has not been added to the Project's licenses.licx file. If your Project does not have a licenses.licx file already, you must create a text file named "licenses.licx" and add it to your PROJECT (not the Solution). <continued...>

etc...

I did rebuild the project multiple times with the licx file in it. It keeps on throwing the same exception.

Could anyone please let me know how I can troubleshoot this situation?

Thanks.

Jarir
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 10, 2006 9:27 AM

Hi,
For VC projects, it is not enough to add the licx file.
You must create a resource from it, and then add this resource.
Below are steps.

Hope it helps,
-ken

1. Make sure there is a licenses.licx file with the appropriate line(s).
For the Telnet component, the file should contain the line:

Dart.PowerTCP.Telnet.Telnet, Dart.PowerTCP.Telnet


2. Use Microsoft's utility "lc.exe" to create the managed resource file for the licx file (myApp.exe.licenses, where "myApp.exe" is the name of your app)

lc.exe /target:myApp.exe /complist:licenses.licx /i:Dart.PowerTCP.Telnet.Dll


3. Tell the linker to embed this resource:

Project Properties -> Linker -> Input -> Embed Managed Resource File -> myApp.exe.licenses


4. Rebuild the Project
Reply | PowerTCP Telnet for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX