473,775 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.AxM SComm, 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.MSCom mClass 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.Reflecti on.FieldInfo f =
typeof(MSCommLi b.MSCommClass). GetField("licen seKey",
System.Reflecti on.BindingFlags .NonPublic | System.Reflecti on.BindingFlags .Instance)

f.SetValue(this , "gnvlslnjskvlml gnnimh")
Nov 15 '05 #1
0 1753

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

Similar topics

2
17934
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 = CreateObject("MSCommLib.MSComm") the compiler errors-out with the message "Run-time error 429: ActiveX comonent can't create object". The online help indicates this problem can be caused when the MSComm32.OCX
1
3597
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 non-developer machine, the application fails to load. It throws an exception, class is not licensed for use. In the source code, a new instance of the control is created, so, when, at runtime, it looks for a design-time license for the control.
2
2744
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 need to register MSComm32.dll into the C#? i read in .NET documents doing this with Ic.exe but i wasn't success. Any help would be greatly appreciated... Thanks in
0
1471
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 need to register MSComm32.dll into the C#? i read in .NET documents doing this with Ic.exe but i wasn't success. Any help would be greatly appreciated... Thanks
0
298
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 development machine. But when I deploy the application with the wrapper dll and the ocx to another machine, at the point where I am using the component, it gives the error 'class not licensed for use'. Please let me have whatever suggestions possible...
5
5372
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 use this ActiveX control" what should I do to use this control??? or is there any replacement?? thanks Mohammed
1
1935
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 .net, hence I do not have a version 6.0 of MSCOMM32.OCX I am trying to update a program that was written in C++ version 6 to be supported in C++ .net. Although I can add an activex control to a dialog box I cannot seem to be able to add a class for...
2
2872
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 have VS 2003 FW 1.1 and VS 6.0 installed). When creating the setup, it nicely includes the mscomm32.ocx and the interop module in the setup project. When installing it on a client machine, everything appears to be ok, and even talking to the...
2
9207
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 tried to build the installer using the Setup and Deployment Projects, I always get the following warning messages saying that the dependencies cannot be found as follows: WARNING: Unable to find dependency 'INTEROP.RICHTEXTLIB'
0
9622
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10268
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10048
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9916
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4017
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2853
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.