flat assembler
Message board for the users of flat assembler.

Index > Windows > nt 3.1 OVERLAPPED io

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 19 Apr 2011, 03:15
Why in this windows overlapped io isnt working? I open file with FILE_FLAG_OVERLAPPED, it succeed, but then ReadFile/WriteFile either return 1, or app crash if i put transferred = null (overlapped is never null).
ReadFileEx/WriteFileEx always return 1, but no data is transferred and apc is never queued.

Why such things happen? I believed that nt has a decent kernel, and only dos based line will have such problems, but here we go Sad


Any ideas? HELP!
Post 19 Apr 2011, 03:15
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 21 Apr 2011, 18:11
problem solved, nt 3.1 io doesnt accept manual reset events. And pointer bytestransferred is not optional even in overlapped mode.
Post 21 Apr 2011, 18:11
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 21 Apr 2011, 19:27
Actually, its only numberofbyteswritten and overlapped must be aligned on 4 bytes. Event can be both types.

I guess alignment is required because IO_STATUS_BLOCK might be passed directly, and kernel require alignment.

But manual suck, it says that only 1 overlapped or numoftransfered is mandatory. On nt 3.1 both are.
Post 21 Apr 2011, 19:27
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 19 Jun 2011, 11:38
Why are you coding against NT 3.1? Just curious, that version is over 15 years old
Post 19 Jun 2011, 11:38
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 19 Jun 2011, 15:18
comrade wrote:
Why are you coding against NT 3.1? Just curious, that version is over 15 years old
Post 19 Jun 2011, 15:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.