Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ With Windows2000 With serial com port

Status
Not open for further replies.

rdubois

Technical User
Aug 17, 2005
2
0
0
US
I have a problem with windows 2000 and a program developed with visual c++ on windows98 when I use serial port.
I developed and application in visual c++ using the serial com port on windows 98. It worked very well.

I just install windows 2000 and my application doesn't work when I tried to communicate to an interface with the serial com port.

If you have the solution, please let me know.

Thanks.
 
rdubois,

Without looking at your code, I suspect the code is trying to directly access hardware. I am not familiar with 98 but this is a no-no on NT and 2000. No inp OR outp
 
Im having the same problem, Im using inp and outp, and it doesnt work, can you tell me how to do it?? how do I open the port and how do I read it?
 
el_bench,
I assume you are using MFC?? A simple example is included in the SDK. Go to Help and search for "Communications Demonstration". We use the DDK here at work, and I haven't written any code for the serial port, except DOS and Unix, both pretty simple compared to Bill's way. The bottom line here is that NT and 2000(and probably XP) will not allow us direct access to hardware. Sorry I'm not more help.....
 
The thing is I dont know how to use the DDK but Im going to learn, but what I found was a program that lets you access all the port in a direct way and its very easy to use and you can use it in a lot of programs, let me send you the URL.


Thanks for everything
 
El_Bench,

I checked out the NTPort library and it looks pretty good, although I didn't download and try it. I would certainly give it a try if I had to write any serial port stuff from the ground up. Thanks!

Tim Moody
 
Try using the CreateFile() function with the appropriate COM port name. I have code written on Win98 originally using CreateFile() that works fine on Win2k.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top