Link to home
Start Free TrialLog in
Avatar of For-Soft
For-SoftFlag for Poland

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(PChar('D:\1\*.*'),FileData);
 repeat Writeln (FileData.cFileName);
 until not FindNextFile(hSearch,FileData);
 FindClose(hSearch);
 ReadLn;
end.

Currently I have stuck on: Undeclared identifier 'WIN32_FIND_DATA'.

I'm a Delphi beginner. Please don't laugh.
Avatar of LRHGuy
LRHGuy

Did you try WinTypes or WinProcs?

It's been a while since I've used D2.
Avatar of For-Soft

ASKER

I just did.
WinTypes and WinProcs units gave nothing.
ASKER CERTIFIED SOLUTION
Avatar of LRHGuy
LRHGuy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
TWin32FindData works fine.
Thanks.