Unable to open COM port on client machine

rws

Member
Joined
Apr 24, 2003
Messages
12
Location
Vermont, USA
Using VB in VStudio.NET Pro.

The app needs to talk through the serial port (COM1).

I have added Interop.MSCommlib as a reference (derived from mscomm32.ocx) and have written a class which inherits from MSComm. It works just fine on my XP machine, both in the development environment, and installed.

For deployment, I have selected these properties for the mscomm32.ocx file on the target machine: selfReg, application folder, non-permanent. Install and uninstall both work, but the program wont run.

I get:

System.Runtime.InteropServices.COM Exception 80040112

Im pretty sure it has to do with licensing ActiveX controls, a subject I know nothing about. The Help isnt helpful, since it seems to focus on licensing custom controls, not Microsoft controls.

I know I should be using the mscomm32.ocx file registered on the target machine, rather than deploying another copy to the application folder, but I dont know how to do this, and I am especially worried about losing it during an uninstall.

Has anyone else run into this problem? Any help would be appreciated. Thanks.
 
There are plenty of .NET classes available online for accessing the serial port. Id avoid COM problems and dump the MSComm32 control altogether.

COM Exception 80040112 is a licensing problem, just to confirm that statement.
 
Back
Top