Solved

Bizarre Error

Posted on 2002-04-25
6
146 Views
Last Modified: 2010-04-04
Hi All when I try to compile my code
I get this Error : Incompatible Type 'Integer' and 'TSearchRec' but it points me to the Function FindClose(SearchRec); SearchRec is a TSearchRec type variable so it must be ok but when I write 'FindClose('
it writes me that the functions want a HFindFile : Integer
I know that FindClose normally takes a TsearchRec as parameter so why it wants an integer now? lol
Thx for your help
0
Comment
Question by:mabell
6 Comments
 
LVL 6

Accepted Solution

by:
zebada earned 75 total points
Comment Utility
You must include SysUtils in your unit's uses clause.
Otherwise Delphi will try to use the Windows SDK version of FindClose which takes an unsigned long integer as an argument.
0
 

Author Comment

by:mabell
Comment Utility
Yes I know .. it's included too thats why I dont Understand lol
0
 

Author Comment

by:mabell
Comment Utility
Mmmmmmm its ok now hahahaha Guess what I have done?
I just move the SysUtil from the beginning of the Uses clause to the end and now it works lol
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 12

Assisted Solution

by:Lee_Nover
Lee_Nover earned 75 total points
Comment Utility
mhm
or use SysUtils.FindClose
a similar thing is in D6 with AllocateWnd and the deprecated directive
it's moved from Forms unit to Classes
so you do the same here .. simply use Classes.AllocateWnd :)
0
 
LVL 33

Expert Comment

by:Slick812
Comment Utility
A Note, the compiler searches the units in the uses clause, starting with the last one and moves forward to the first one.
0
 
LVL 1

Expert Comment

by:pnh73
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split points between zebada and Lee_Nover

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

13 Experts available now in Live!

Get 1:1 Help Now