WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

File OVERLAPPED Input/Output, you provide an OVERLAPPED struct; within that struct, the 'offset' indicates where the data are read-from or written to.

ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 873
Member No.: 5019
Joined: 13-May 07


Hi


what make this save this the offset from the end of file?

.data
ovrOffset OVERLAPPED <>
invoke filesize,esi
mov ovrOffset.loffset,EAX

I need this for my writefile function

thanks in forward
ragdog
PMUsers Website
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


Sorry ragdog, I don't understand your question.
PMEmail PosterUsers Website
Top
ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 873
Member No.: 5019
Joined: 13-May 07


@Akyprian

My question is solved by Tedd (in masm32 board)

For overlapped-IO, you provide an OVERLAPPED struct..
within that struct, the 'offset' indicates where the data should be read-from or written-to.

So, in the case of writing, if you set it to the current file-size, the data will be written to the end of the file (appended.)
I'm guessing setting offset to -1 will also cause it to append (so you shouldn't need to get filesize), but you'll have to test to see if it actually does.

But, since you're the one saving the file, I presume you'll already know how much you've written, so you'll already know the offset without getting the filesize each time.

greets,
ragdog
PMUsers Website
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


I see, nice question and a VERY good explanation. Thanks for the info.
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google