|
-
April 14th, 1999, 11:09 PM
#1
Accessing serial port with VC++
i made a software in VC++ (compiled it on win 95)
it accesses the serial port(through standard "ReadFile & WriteFile" commands)
and transmits data onto some hardware connected to the PC, through the serial port. when i tried to run the executable on win NT, it said that it can't access the port.
i even tried to run the executable from the administrator's account, just to make sure that you don't need administrative priveliges to access the port.
but it failed even there.
how do i fix this problem?
thanks in advance.
-
April 15th, 1999, 05:40 AM
#2
Re: Accessing serial port with VC++
How are you opening the file?
-
April 15th, 1999, 11:13 PM
#3
Re: Accessing serial port with VC++
well i am just running my executable which accesses the serial port, by ReadFile and Writefile commands.
-
April 16th, 1999, 02:57 AM
#4
Re: Accessing serial port with VC++
Are you using CreateFile and if so what params.
-
April 16th, 1999, 07:59 AM
#5
Re: Accessing serial port with VC++
no i am not using CreateFile or anything like that...
i think i didn't explain clearly..
in my program, i try accessing COM1, COM2, COM3, COM4 using
init_com_port("com1", 9600) and so on.
9600 here is the baud rate... whichever port i am able to access first, i set that as my port..
but in case of win NT, my aplication(which i built on win 95) is unable to access the port any of these ports .
i hope i made myself clear here.
kapil
-
April 16th, 1999, 08:04 AM
#6
Re: Accessing serial port with VC++
What is init_com_port()?
If you're using ReadFile/WriteFile you must first open the file using something like CreateFile?
Could this be your problem?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|