For-Soft
asked on
Which unit to include in ordrer to use WIN32_FIND_DATA statement
I'm trying to compile (Delphi 2) following code:
program Test;
{$APPTYPE CONSOLE}
uses
SysUtils;
var FileData: WIN32_FIND_DATA;
hSearch: THandle;
begin
hSearch:=FindFirstFile(PCh ar('D:\1\* .*'),FileD ata);
repeat Writeln (FileData.cFileName);
until not FindNextFile(hSearch,FileD ata);
FindClose(hSearch);
ReadLn;
end.
Currently I have stuck on: Undeclared identifier 'WIN32_FIND_DATA'.
I'm a Delphi beginner. Please don't laugh.
program Test;
{$APPTYPE CONSOLE}
uses
SysUtils;
var FileData: WIN32_FIND_DATA;
hSearch: THandle;
begin
hSearch:=FindFirstFile(PCh
repeat Writeln (FileData.cFileName);
until not FindNextFile(hSearch,FileD
FindClose(hSearch);
ReadLn;
end.
Currently I have stuck on: Undeclared identifier 'WIN32_FIND_DATA'.
I'm a Delphi beginner. Please don't laugh.
ASKER
I just did.
WinTypes and WinProcs units gave nothing.
WinTypes and WinProcs units gave nothing.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
TWin32FindData works fine.
Thanks.
Thanks.
It's been a while since I've used D2.