what am I doing wrong?
I've been on UT looking and the DECLARE statements is all
I can find (only for FindFirstFile and FindNextFile)
here is my code... I did have a FindNextFile call in there but I can't get FindFirstFile to work so I took it out...
the output after running this is an empty string
I've been on UT looking and the DECLARE statements is all
I can find (only for FindFirstFile and FindNextFile)
here is my code... I did have a FindNextFile call in there but I can't get FindFirstFile to work so I took it out...
the output after running this is an empty string
Code:
*-------------
* APITest.prg
*-------------
* declare API functions
DECLARE INTEGER FindFirstFile IN Win32API STRING @lpFileName, STRING @lpFindData
DECLARE SHORT FindNextFile IN Win32API INTEGER hFindFile, STRING @lpFindData
DECLARE INTEGER FindClose IN Win32API INTEGER hFindFile
* find first file
PUBLIC sFileName, sFindData
sFileName = "d:\poems\*.txt"
sFindData = ""
hSearch = FindFirstFile(@sFileName,@sFindData)
IF hSearch = -1
=MessageBox("NO files found!",16,"ERROR")
RETURN
ENDIF
* print out the info
? sFindData
* close the handle
=FindClose(hSearch)