flat assembler
Message board for the users of flat assembler.

Index > Windows > Get File Size With Native API

Author
Thread Post new topic Reply to topic
bcdsys



Joined: 04 Aug 2008
Posts: 41
bcdsys
Is there any efficient way get file size with native API? Or is only way read to end with ZwOpenFile or ZwCreateFile and count bytes read?
Post 12 Oct 2008, 18:49
View user's profile Send private message Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
I did 5 seconds of google and found this, maybe It can help? GetFileAttributesEx
Theres also GetFileSizeEx....but that requires an open file
Post 12 Oct 2008, 19:00
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
ZwQueryInformationFile (FileStandardInformation / FILE_STANDARD_INFORMATION)
Post 12 Oct 2008, 19:11
View user's profile Send private message Reply with quote
bcdsys



Joined: 04 Aug 2008
Posts: 41
bcdsys
That's win32 api.
How to do this native API, only NT*/Zw* functions?

EDIT: post about Windwakr post, not asmfan post. Made post when asmfan post


Last edited by bcdsys on 12 Oct 2008, 19:15; edited 1 time in total
Post 12 Oct 2008, 19:11
View user's profile Send private message Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
Oh, sorry...didn't understand what you wanted.
Post 12 Oct 2008, 19:14
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
I did Very Happy
Post 12 Oct 2008, 19:17
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.