I can read from serial port in XP with a code for Win98!

Status
Not open for further replies.

Munib

Advanced Member level 4
Joined
Jun 11, 2004
Messages
114
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
1,129
serial port in xp

why i cant read from serial port whem i m using windows XP the same code works well in windows 98
i m using C++
 

Re: serial port in xp

Windows XP, and in general NT, have mechanisms in place which prevent you from accessing the serial port directly like you used did in Win95/98/Me.

In order to allow legacy code to work have a look at: **broken link removed** essentially it includes a driver which will allow older code to work.

You can access the serial port (and any other device) using the Windows API CreateFile() function and set the DCB structure. Have a look at:

- Jayson
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…