rainette
asked on
'findfirst' in Borland C++ for Win32
The 'findfirst' function (Borland C++ 5.02,Borland C++ Builder) returns WRONG results of file date and file time
when called for FA_LABEL attribute, i.e to detect disk's label. The same function used in 16 bit environment returns
correct results for both date and time.
How could I in 32 bit program written in Borland C++ detect true date & time of disk label ? Perhaps I could do it in assembler subroutine ? Perhaps there are other functions to do it ?
by assembler subroutine
when called for FA_LABEL attribute, i.e to detect disk's label. The same function used in 16 bit environment returns
correct results for both date and time.
How could I in 32 bit program written in Borland C++ detect true date & time of disk label ? Perhaps I could do it in assembler subroutine ? Perhaps there are other functions to do it ?
by assembler subroutine
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In Win32, FindFirstFile does not return the disk label. GetVolumeInformation returns it, but no date and time information.
Just in case someone else comes across this, you can get the Date and Time of the file from the correct conversion of the Time attribute of the TSearchRec:
TSearchRec sr;
FindFirst(path, iAttributes, sr);
ShowMessage(path + "," +
DateTimeToStr(FileDateToDa teTime(sr. Time)) + "," +
IntToStr(sr.Size));
TSearchRec sr;
FindFirst(path, iAttributes, sr);
ShowMessage(path + "," +
DateTimeToStr(FileDateToDa
IntToStr(sr.Size));
ASKER
program (DOS application) but I am not able to prohibit DOS screen to appear (redirection
of stdout goes but this screen appears nevertheless). Do you know if this is possible ?