Solved

Which unit to include in ordrer to use WIN32_FIND_DATA statement

Posted on 2004-09-29
4
858 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

728 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