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...
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...
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...
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.
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
Hi Randall.
Just an FYI: stdout.write is not documented in hlastdlib.rtf
Just an FYI: stdout.write is not documented in hlastdlib.rtf
Hi Randall.
Just an FYI: stdout.write is not documented in hlastdlib.rtf
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
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 :(
I dont' remember exactly though. My dev. hard drive crashed and I lost a lot of documents which I have to download again :(
.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)