Solved

Which unit to include in ordrer to use WIN32_FIND_DATA statement

Posted on 2004-09-29
4
853 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 64
Newbie Thread Programming 1 154
Delphi inherited method 6 70
Need Help Delphi 2010 CheckBox1 Stored value in memo 13 67
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

823 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