Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with MSCOMM32.OCX

563 views
Skip to first unread message

Roberto - Syd

unread,
Jul 13, 2002, 9:30:19 PM7/13/02
to
I have build an application in .NET that contain the MSCOMM32.OCX and it
runs right on the developer platform, but when I install the application in
the user's computer the application runs right, but when the user tries to
access at the component ms comm the application causes an error.

there's someone that can help me

Thank you Roberto - Syd


Michael Hauer

unread,
Jul 14, 2002, 6:16:22 AM7/14/02
to
Hi Roberto

Do you register the ocx on the user pc? By the way you should use only the
.Net framework and not this control.

Greetings
Mike


Roberto - Syd

unread,
Jul 14, 2002, 9:45:42 PM7/14/02
to

I have builded a setup project with the wizard of VB.NET and it included the
MS Comm control and other two component interoperability.commdlg.dll and
exportability.commdlg.dll.

Then I tried to register the ocx with regsvr32 on the user's computer but it
was registered, then I have unregistered the ocx and when the application
started I had an error.

Can you tell me which is the other way that I can use to work with serial
ports instead to use MS Comm Control ?

Thank you for the answer.

Greetings

Roberto - Syd


Peter Wu [MSFT]

unread,
Jul 15, 2002, 2:50:20 AM7/15/02
to
>
>Then I tried to register the ocx with regsvr32 on the user's computer but
it
>was registered, then I have unregistered the ocx and when the application
>started I had an error.
>

What is the error message?

--
Peter Wu
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Dick Grier

unread,
Jul 15, 2002, 6:55:39 PM7/15/02
to
Hi,

There are missing file(s). When you add MSComm32.ocx to a .NET project,
.NET builds a set of interop files. You don't mention
AxInterop.MSCommLig.dll (this is the interoperability assembly form MSComm
that is created). I think that InteropStdType.dll may be created, also.
Did you distribute these additional files?


--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.

Roberto - Syd

unread,
Jul 15, 2002, 8:12:57 PM7/15/02
to

> Hi,
>
> There are missing file(s). When you add MSComm32.ocx to a .NET project,
> .NET builds a set of interop files. You don't mention
> AxInterop.MSCommLig.dll (this is the interoperability assembly form MSComm
> that is created). I think that InteropStdType.dll may be created, also.
> Did you distribute these additional files?
>
>
> --
> Richard Grier (Microsoft Visual Basic MVP)
>

In the setup project I have these tree dependencies:
AxInterop.MSCommLib.dll
Interop.MSCommLib.dll
MSCOMM32.OCX

In the previous messagge I was wrong before I didn't remember the right name
of the dll.

Thank you for the answer
Greetings Roberto - Syd


Roberto - Syd

unread,
Jul 15, 2002, 8:18:02 PM7/15/02
to

> >Then I tried to register the ocx with regsvr32 on the user's computer but
> it
> >was registered, then I have unregistered the ocx and when the application
> >started I had an error.
> >
>
> What is the error message?
>

I don't remember the error message, but today I will go to my client and
I'll write its.

Thank you for answer

Greetings Roberto - Syd


Dick Grier

unread,
Jul 16, 2002, 11:04:38 AM7/16/02
to
Is the .NET Framework installed on the target machines?

There really should be no problem distributing an application that uses
MSComm, as long as the noted files are included. In fact, I am fairly sure
that MSComm32.ocx does not need to be installed or registered. If I recall
my study of this issue, all that is needed is the AxInterop.MSCommLib.dll,
which should be located in the same folder as your binary (EXE) file.

Let us know the text of the error message and we may be able to offer some
more concrete advice.

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Roberto - Syd

unread,
Jul 17, 2002, 7:15:13 PM7/17/02
to

> >Then I tried to register the ocx with regsvr32 on the user's computer but
> it
> >was registered, then I have unregistered the ocx and when the application
> >started I had an error.
> >
>
> What is the error message?
>
Here is the text of error message:

"System.Runtime.InteropService.COMException (0x800A1F42) : Exception from
HRESULT : 0x800A1F42"

Thanks a lot

Roberto - Syd

Roberto - Syd

unread,
Jul 17, 2002, 7:14:10 PM7/17/02
to

> Is the .NET Framework installed on the target machines?

Yes, it is

>
> There really should be no problem distributing an application that uses
> MSComm, as long as the noted files are included. In fact, I am fairly
sure
> that MSComm32.ocx does not need to be installed or registered. If I
recall
> my study of this issue, all that is needed is the AxInterop.MSCommLib.dll,
> which should be located in the same folder as your binary (EXE) file.
>
> Let us know the text of the error message and we may be able to offer some
> more concrete advice.
>

Here is the text of error message:

"System.Runtime.InteropService.COMException (0x800A1F42) : Exception from
HRESULT : 0x800A1F42"

thanks a lot

Roberto


Gary Davis

unread,
Jul 21, 2002, 8:29:38 PM7/21/02
to
I have a similar problem.

My program is written in C#.

The error is slightly different:

Exception from HRESULT: 0x800A1F4C.

I copied these files from the development to the target server:

AxInterop.MSCommLib.dll
Interop.MSCommLib.dll
MSCOMM32.OCX
CallerID.exe (my program)

The mscomm32.ocx was copied to the /windows/system32 folder.

The statement that generates the error is the one that sets the PortOpen = true:

if (com.PortOpen) com.PortOpen = false;
com.CommPort = Convert.ToInt16(ComPort.Text);
com.RThreshold = 1;
com.Settings = "9600,n,8,1";
com.DTREnable = true;
com.Handshaking = MSCommLib.HandshakeConstants.comNone;
com.InputMode = MSCommLib.InputModeConstants.comInputModeText;
com.InputLen = 0;
com.NullDiscard = true;
com.OnComm += new System.EventHandler(this.OnComm);
com.PortOpen = true;
com.Output = "AT Z\r\n";

Thanks,
Gary Davis

Erland

unread,
Jul 25, 2002, 3:08:39 AM7/25/02
to
ld.com (Gary Davis) wrote in message news:<ba97c971.02072...@posting.google.com>...


Hello !

I am currently working on a Telephone app. in C#, but i can`t seem to
find any samples written in C#.
The app is simple, just get the callerid in a window.
Have you any experience with this?


Desperatly waiting... :)

Thank you

Erland Strømmen (Norway)

Leo Parker

unread,
Aug 13, 2002, 12:14:32 AM8/13/02
to
"Roberto - Syd" <p.ro...@tin.it> wrote in message news:<6TmZ8.93866$vm5.3...@news2.tin.it>...

I got this same message when working on a C# program that uses the
MSComm control from VB6. My problem was that the com port I was using
was disabled in device manager. Check that the comport property is
set to a com-port that your computer actually has.

0 new messages