Solved

Which unit to include in ordrer to use WIN32_FIND_DATA statement

Posted on 2004-09-29
4
845 Views
Last Modified: 2010-04-16
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.
0
Comment
Question by:For-Soft
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:LRHGuy
ID: 12182178
Did you try WinTypes or WinProcs?

It's been a while since I've used D2.
0
 
LVL 10

Author Comment

by:For-Soft
ID: 12182279
I just did.
WinTypes and WinProcs units gave nothing.
0
 
LVL 7

Accepted Solution

by:
LRHGuy earned 50 total points
ID: 12182646
I found my old Delphi2 and Win32_Find_Data is not in there anywhere.

You might replace it with TWin32FindData found in the Windows unit. It's exactly what you need!

0
 
LVL 10

Author Comment

by:For-Soft
ID: 12182705
TWin32FindData works fine.
Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now