Hi!

I'm a Newbie in Asm.

I got the following prob:

I want to search for a File with FindFirstFile
It needs to parameters:
LPCTSTR lpFileName, // pointer to name of file to search for
LPWIN32_FIND_DATA lpFindFileData // pointer to returned information

First Parameter is:

.data
SearchString db "*.mp3",0

right?

But I dont know how to define WIN32_FIND_DATA. Its a Struct and I tried to define it with:

.data?
FileInfo WIN32_FIND_DATA ?

But it doesnt Work.

Thats my whole Programm:



.386
.model flat,stdcall
option casemap:none

include /masm32/include/windows.inc
include /masm32/include/user32.inc
include /masm32/include/kernel32.inc
includelib /masm32/lib/kernel32.lib
includelib /masm32/lib/user32.lib


.DATA
SearchString db "*.mp3",0


.DATA?
FileInfo WIN32_FIND_DATA ?


.CODE
start:
invoke FindFirstFile,ADDR SearchString,ADDR FileInfo


invoke ExitProcess,NULL
end start


Whats wrong? :(

Errormsg:
C:\masm32\Proggy\Proggy.asm(17) : error A2179: structure improperly initialized
C:\masm32\Proggy\Proggy.asm(17) : error A2008: syntax error : in structure
C:\masm32\Proggy\Proggy.asm(22) : error A2006: undefined symbol : DateiInfo
C:\masm32\Proggy\Proggy.asm(22) : error A2114: INVOKE argument type mismatch : a
rgument : 2
Posted on 2002-07-21 17:05:05 by Subby


FileInfo WIN32_FIND_DATA <>


Please use the search engine of this Forum next time.
You just need to enter "win32_find_data" as keyword
to find some source code wich uses this structure.

Thanks!

bAZiK
Posted on 2002-07-21 17:09:12 by bazik
Hi!

Thanks for the fast reply! :)

Yes, of course i will try the search next time, first!



PS: Very cool Forum about Asm & Sorry for my bad englisch ;)
(I'm German)
Posted on 2002-07-21 17:16:20 by Subby
oh and since you're new, we just recently made a FAQ forum.

Please check out the sticky post there and tell us if this works for you. Is it clear/easy enough? Does it need other things? Let us know in the FAQ thread in the 'Main' forum please :)

Thx.

-H-
Posted on 2002-07-21 17:22:35 by Hiroshimator