I'm trying to get sonme information from the details page of a file properties dialogue box.
For example:
I'm just after the two underlined dates for now.
I have searched and found some code in the thread here:
a thread on the Tek-Tips forums
and I've found other code around which looks very similar to the code in that thread.
I grabbed that code and made a little application to check it - the code in the button handler is:
procedure TfmMain.Button1Click(Sender: TObject);
var
fnp: string;
bb: boolean;
ss: string;
begin
fnp := 'c:\temp\aaaa.doc';
bb := IsNTFS(fnp);
if bb then
moOne.lines.add('Yes, it is NTFS')
else
moOne.lines.add('No, it is not NTFS');
ss := GetFileSummaryInfo(fnp);
moOne.lines.add(ss);
end;
The NTFS check works fine, my file system is reported as NTFS, but I get the following OLE error
Project raised exception class EOleSysError with message 'OLE error 80030002'
Stepping through, this occurs on the line:
OleCheck(PropSetStg.Open(FmtID_SummaryInformation,
STGM_READ or STGM_SHARE_EXCLUSIVE, PropStg));
in the code I linked to on the Embarcadero forums.
What am I doing wrong?
I'm using Delphi 5 on Win 7 64 bit.