473,382 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

licensing mscomm32.ocx from C#

VR
I wrote a wrapper class around mscomm32.ocx in C# and I have a problem deploying it to a PC without IDE installed. I am getting an error message about the class not being licensed. I found some references to that in MS knoweldge base - they claim I need to add the license manually to the cotrol, at run time

Here is what my class is like

I added reference to mscomm32.ocx in project and then created my class
I purposely use MSCommClass instead of AxMSCommLib.AxMSComm, because I don't need all the members for the .NET control. All I need is comm functionality

How can I add the license at run time
class MyCom

protected MSCommLib.MSCommClass m_oCommPort = null
public MyComm(

// ADD LICENSE CODE HERE????
m_oCommPort = new MSCommClass(); // causes an exceptio

Any help is greatly appreciated
Thanks a lot
V

P.S. Here is a code snippet I found, that is semi-useful, I just don't know what to make of it: seems like it need AxComm, and not MSComm, and even for AxComm, I am not sure how to use it

System.Reflection.FieldInfo f =
typeof(MSCommLib.MSCommClass).GetField("licenseKey ",
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)

f.SetValue(this, "gnvlslnjskvlmlgnnimh")
Nov 15 '05 #1
0 1724

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom Hill | last post by:
I am having trouble using MSComm32.OCX in my VB6 application. When I attempt to use the set command to create the comm object, like this: Dim MSComm1 As Object Set MSComm1 =...
1
by: Sue | last post by:
I want to deploy a Visual studio.net windows application. This application uses MSCOMM32.OCX control. This application works fine on a development machine. However, if I deploy it on a...
2
by: eray | last post by:
hi ; at the C# compiler using a MSCOMM32.ocx project, when i want to install this project on the pc which is not installed visual basic says "there is no licence". for solving this problem do i...
0
by: Eray Çakır | last post by:
hi ; at the C# compiler using a MSCOMM32.ocx project, when i want to install this project on the pc which is not installed visual basic says "there is no licence". for solving this problem do i...
0
by: news.microsoft.com | last post by:
Hi Everyone, I am using mscomm32.ocx in my application. Visual Studio automatically created the interop wrapper dll for it and placed the ocx in my application. Things work fine on the...
5
by: Mohammed Abdel-Razzak | last post by:
Dear sirs I`ve added the com component "Microsoft communications control" to my project toolbox (in C#) but when I double clicked it, I got the following error message "You don`t have a license to...
1
by: Ken Maitland | last post by:
I have a version of mscomm32.ocx on my machine which is dated 1997. I assume this is the version that came with my Visual Development suite 97. I did not buy a Version 6 and went straight to...
2
by: Urs Vogel | last post by:
Hi For supporting the serial port for remote data collection on manufacturing devices, I added the mscomm32.ocx Active-X component to my .Net 1.1 application, which works fine on my machine (I...
2
by: Alex Su | last post by:
Hello all, I'm new to VB.net and have just built a small application that makes use of some VB6 ocx such as mscomm32.ocx for data communication with a machine. The application runs OK but when I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.