Windows 7 64 bit and IO.Ports.SerialPort

  • Thread starter Thread starter mattd1
  • Start date Start date
M

mattd1

Hi all -

Is anyone using the IO.Ports.SerialPort object successfully under Windows 7
64 bit? My PC crashed and in the rebuild I moved to 64 bit Win7, and now an
app I had running successfully for quite a while (probably a year) on 32 bit
Vista now does not work on Win7 64 bit. I get various random errors, like
stack overflows in mscorlib, uninitialized objects, all in mscorlib. Twice
while debugging I stepped through some comm code, and it actually blue
screened Win7 with a page fault. I have other apps that do not use the
serial port, and they work fine on 64 bit, it seems the serial port object
has some serious problems in 64 bit. Can anyone confirm this? Or tell me
what magic trick needs to be performed to get it to work right?

Thanks

Matt
 
Hi all -

Is anyone using the IO.Ports.SerialPort object successfully under Windows 7
64 bit? My PC crashed and in the rebuild I moved to 64 bit Win7, and now an
app I had running successfully for quite a while (probably a year) on 32 bit
Vista now does not work on Win7 64 bit. I get various random errors, like
stack overflows in mscorlib, uninitialized objects, all in mscorlib. Twice
while debugging I stepped through some comm code, and it actually blue
screened Win7 with a page fault. I have other apps that do not use the
serial port, and they work fine on 64 bit, it seems the serial port object
has some serious problems in 64 bit. Can anyone confirm this? Or tell me
what magic trick needs to be performed to get it to work right?

Thanks

Matt

I don't have particular knowledge about the SerialPort class. Whenever
this type of scenario would occur in other codes moved to 64 bits, I
would rebuild the application targeting 32 bits (x86) and try the
application in that mode. The "Any CPU" mode seems to provide a false
sense of security in some respects.
 
I did try that, and it just gave me different errors. I may wind up using XP
mode to see if that can get around the problem. I thought I would be safe
using the built in serial port classes. Guess I was wrong.

Thanks for the reply though

Matt
 
Yes, I use it often, and haven't seen any such problem.

Do you have some simple code that duplicated the issue?

Dick

--
Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue
Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004, Revised July
2006.
 
At the moment, I don't have any simple code. It's all in the app. Since you
are able to use SerialPort successfully on 64 bit Win 7, I think the next
step will be to extract my comm code and try it separately from the other
code. I did comment a bunch of the existing app code out when I was trying
to pin down exactly what's going on, but the results were so random, and
each time I tried it I would get a different error, or no error at all and
the app would just shut down.

Thanks for your reply. I'll have to look at this more closely.

Matt
 
Hello Matt,
Is anyone using the IO.Ports.SerialPort object successfully under Windows
7 64 bit? My PC crashed and in the rebuild I moved to 64 bit Win7, and now
an app I had running successfully for quite a while (probably a year) on
32 bit Vista now does not work on Win7 64 bit.

In addition to what others have already said, I'd like to ask more details
about the device/hardware you are trying to communicate with on Windows 7
64-bit. Can you share more details about it?

Technically, you should be able to use the SerialPort class the same n
32-bit and 64-bit installations, but could it be that the device itself
doesn't like 64-bit Windows 7? That is, do you need to install any drivers
for the device? If yes, then it *might* be the problem, and not the code
you've written. If the serial port a virtual/software serial port by chance?

Thanks!

--
Regards,

Jani Järvinen
C# MVP
Vantaa, Finland
E-mail: (e-mail address removed)
Business: http://www.nimacon.net/
Personal: http://www.saunalahti.fi/janij/
 
Back
Top