IO Communication problem 
Author Message
 IO Communication problem

Hi all.
I'm developing a remote control software that must communicate with a number
of devices connected by serial ports, TCP/IP sockets and so on.
Every device communicate with a simple protocol: I send one or more bytes to
it and it responds with one or more bytes.
Obviously I want obtain asyncronous I/O.

How can I do?
I thought to use ReadFile/WriteFile or ReadFileEx/WriteFileEx API functions.
Last couple is better IMHO because I can pass callback function pointer
(with
Address Of) and pass to sleep mode (in this mode user can navigate in menu,
show every form associated with devices without blocking).
But I'm not able to let these functions to work (see my previous article).

Are there any other solutions for my problem? Obviously I can't use thread
in
Visual Basic (and I don't want).



Sat, 12 Mar 2005 02:48:53 GMT  
 IO Communication problem
Look at the source of my WinsockLib. It demonstrates a couple of techniques on how to perform async IO with Winsock Also, my
FileSystemLib demonstrates async IO using a waitable/overlapped approach as well as an APC (asynchronous procedure call while in a
wait state).

+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
Monte Hansen
http://KillerVB.com
+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+

Quote:

> Hi all.
> I'm developing a remote control software that must communicate with a number
> of devices connected by serial ports, TCP/IP sockets and so on.
> Every device communicate with a simple protocol: I send one or more bytes to
> it and it responds with one or more bytes.
> Obviously I want obtain asyncronous I/O.

> How can I do?
> I thought to use ReadFile/WriteFile or ReadFileEx/WriteFileEx API functions.
> Last couple is better IMHO because I can pass callback function pointer
> (with
> Address Of) and pass to sleep mode (in this mode user can navigate in menu,
> show every form associated with devices without blocking).
> But I'm not able to let these functions to work (see my previous article).

> Are there any other solutions for my problem? Obviously I can't use thread
> in
> Visual Basic (and I don't want).



Sat, 12 Mar 2005 07:41:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. IO Problems - Second Post(First Didnt make it)

2. Problem or bug with System.IO.FileSystemWatcher

3. Problem using VBScript for file IO

4. File IO and File Filter Problems

5. VB6 and DB IO problem

6. File IO problem..

7. Communication problems, not relation problems:)

8. Communication link failure: Communication error

9. PROBLEM WITH COMMUNICATION PROGRAM IN GWBASIC

10. Communication Problem

11. Communications Problem in QuickBasic

12. QB$% QB45, serial communications problem

 

 
Powered by phpBB® Forum Software