Mrs. Brisby wrote:

On Sat, 2005-07-30 at 14:30 +0200, Jan-Eric Duden wrote:
Win9X doesn't support the API async file operations.
WinNT/2K/XP does support it.

It supports everything it needs to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/waitformultipleobjects.asp


it doesn't support async file NOTIFICATIONS, (afaik), but those aren't
necessary...

How should waitformultipleobjects help with aync file io?

For async file io on Win32 you would open a file with CreateFile and pass the FILE_FLAG_OVERLAPPED flag. After that, functions like WriteFile and ReadFile work asynchronously. Unfortunately, on Win9X/ME it is not supported for files on disk.
For example, see the docs of WriteFile/ReadFile/WriteFileEx/ReadFileEx:
*"Windows 95/98/Me: *For asynchronous write operations, /hFile/ can be a communications resource opened with the FILE_FLAG_OVERLAPPED flag by *CreateFile*, or a socket handle returned by *socket* or *accept*. You cannot perform asynchronous write operations on mailslots, named pipes, or *disk files*. "


Regarding threads:

Threads complicate things. People think they "understand threads" long
before they actually do. Goto complicates things. People think they
"understand goto" long before they actually do.
That's a completely normal property of human nature. You should get used to it.
This behavior is not limited to the issue of using thread or goto.
It applies to everything that needs some skill.
Most people just don't know what they can do or can't do until they fail.
Even if they fail they think they succeeded.
To make things worse, once you taught someone to know better, then someone else 
will take his/her place.

Agreed.



Reply via email to