API - Opening a Comm port -NT 
Author Message
 API - Opening a Comm port -NT

Having a problem with opening a port on NT op sys.

Using

r = CreateFile("COM2", GENERIC_READ or GENERIC_WRITE, 0,0,
OPEN_EXISTING, 0,0)

but ...
it always returns INVALID_HANDLE_VALUE

All per Dan Appleman's VB 5.0 Programmers Guide to API and the KB
documentation.

Harware ok - everthing work with MSComm.

Any ideas ???



Tue, 06 Feb 2001 03:00:00 GMT  
 API - Opening a Comm port -NT
Check out this site:

www.microsoft.com/win32dev/base/serial.htm

Steve

Quote:

>Having a problem with opening a port on NT op sys.

>Using

>r = CreateFile("COM2", GENERIC_READ or GENERIC_WRITE, 0,0,
>OPEN_EXISTING, 0,0)

>but ...
>it always returns INVALID_HANDLE_VALUE

>All per Dan Appleman's VB 5.0 Programmers Guide to API and the KB
>documentation.

>Harware ok - everthing work with MSComm.

>Any ideas ???



Tue, 06 Feb 2001 03:00:00 GMT  
 API - Opening a Comm port -NT
Check out the book The Visual Basic Programmers Guide to Serial
Communications by Richard Grier
You should be able to get it at Amazon.com
Quote:

>Having a problem with opening a port on NT op sys.

>Using

>r = CreateFile("COM2", GENERIC_READ or GENERIC_WRITE, 0,0,
>OPEN_EXISTING, 0,0)

>but ...
>it always returns INVALID_HANDLE_VALUE

>All per Dan Appleman's VB 5.0 Programmers Guide to API and the KB
>documentation.

>Harware ok - everthing work with MSComm.

>Any ideas ???



Mon, 12 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Comm ports and running Quickbasic programs under windows or NT

2. -Problem- 16 Bit Comm Port Access in Windows NT

3. Open comm port

4. How to detect an open comm port

5. opening and sending BINARY to a comm port.

6. Comm port freezes on open!

7. (Q) How to open a comm port.

8. How to open comm port in VB4.0?

9. Opening a comm port for input

10. Comm Port will not Open

11. Open Comm Port?

12. monitor an already open comm port or NIC?

 

 
Powered by phpBB® Forum Software