flat assembler
Message board for the users of flat assembler.

Index > Windows > How To Do FindFirstFile?

Author
Thread Post new topic Reply to topic
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis 24 Dec 2004, 18:21
How do i do that? i have try translate some MASM examples, but failed again. Can any help me?[/code]

_________________
LOOOL
Post 24 Dec 2004, 18:21
View user's profile Send private message Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin 24 Dec 2004, 18:50
Post it and somebody can translate. Why not?
Post 24 Dec 2004, 18:50
View user's profile Send private message ICQ Number Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis 24 Dec 2004, 19:18
Code:
.data
diry    db 'c:\windows\*.ini',0
wfd     WIN32_FIND_DATA

.code

invoke FindFirstFile,addr diry,addr wfd
invoke MessageBox,0,addr wfd.cFileName,diry,MB_OK
    

i try make my own, the problem is the WIN32_FIND_DATA, its not automatic maded in FASM like in MASM, so i try this example i just found, and change a little of it, but doesn't show a file
Code:
include '%fasminc%\win32ax.inc'
struct WIN32_FIND_DATA
.dwFileAttributes       dd ?
.ftCreationTime         dq ?
.ftLastAccessTime       dq ?
.ftLastWriteTime        dq ?
.nFileSizeHigh          dd ?
.nFileSizeLow           dd ?
.dwReserved0            dd ?
.dwReserved1            dd ?
.cFileName              rb 260
.cAlternateFileName     rb 14
ends
.data
filef   db 'c:\winnt\*.*'
FD      WIN32_FIND_DATA
fil     rb 1000
.code
start:
invoke FindFirstFile,filef,FD
mov byte [fil],byte [FD.cFileName]
invoke MessageBox,0,fil,fil,MB_OK
invoke ExitProcess,0
.end start 
    


?? what the hell do i gonna do with it?

_________________
LOOOL
Post 24 Dec 2004, 19:18
View user's profile Send private message Reply with quote
zjlcc



Joined: 23 Jul 2003
Posts: 32
Location: china
zjlcc 24 Dec 2004, 19:47
include '%fasminc%\win32ax.inc'

.data

;filef db 'c:\winnt\*.*'
filef db 'c:\*.*',0
FD FINDDATA
fil rb 1000

.code

start:

invoke FindFirstFile,filef,FD
;mov ebx,DWORD[FD.cFileName]

invoke MessageBox,0,FD.cFileName,FD.cFileName,MB_OK

invoke ExitProcess,0

.end start
Post 24 Dec 2004, 19:47
View user's profile Send private message Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis 24 Dec 2004, 21:33
THANKS, its was just that i need...

_________________
LOOOL
Post 24 Dec 2004, 21:33
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.