hi everyone !

my prog works nearly fine now, except that the return value of 'FindFileData.cFileName' is a strange 2-dgt hex. number, instead of the name of the file...

program fff; // (FindFirstFile)


#include( "stdout.hhf" )
#include( "w.hhf" )

var
FindFileData: w.WIN32_FIND_DATA;
endvar;

begin fff;

w.FindFirstFile
(
"C:\hla",
FindFileData
);

stdout.put("the first file found is : ",FindFileData.cFileName);

end fff;


what is wrong ?
(my aim is to retrieve the name of the first file found in the C:\hla" directory...)

thanks for help,

Juan, Belgium...
Posted on 2004-10-08 07:58:57 by Juan
FindFileData.cFileName is a byte array or c style string not an HLA string so I guess the stdout.put macro prints the first byte only. You can either convert FindFileData.cFileName to an HLA string or you can use the WriteConsole api function to print it as a c string.
Posted on 2004-10-08 08:16:17 by Odyssey
FindFileData.cFileName is a byte array or c style string not an HLA string so I guess the stdout.put macro prints the first byte only. You can either convert FindFileData.cFileName to an HLA string or you can use the WriteConsole api function to print it as a c string.


Or use stdout.write.
Cheers,
Randy Hyde
Posted on 2004-10-11 12:56:21 by rhyde
Hi Randall.

Just an FYI: stdout.write is not documented in hlastdlib.rtf
Posted on 2004-10-11 19:06:00 by Kain
Hi Randall.

Just an FYI: stdout.write is not documented in hlastdlib.rtf

\
Whoops, should have been fileio.write.
Just use the standard output handle.

Cheers,
Randy Hyde
Posted on 2004-10-11 22:55:01 by rhyde
In the library source, there was an stdout.write as well, which probably does the same thing as fileio.write, except that it gets the standard output handle itself.

I dont' remember exactly though. My dev. hard drive crashed and I lost a lot of documents which I have to download again :(
Posted on 2004-10-12 21:42:43 by Kain
.if AX!=02E2Eh && AX!=0002Eh	; '..' and '.'
If you look at the Examples in MASM32, you will notice this line. It's for screening out the sub-directory over head files. '.' = Dir entries and '..' FAT entries.

Regards, P1 8)
Posted on 2004-10-15 16:44:29 by Pone