|This method is obsolete. See the Remarks section below.|
Utilities.TSearchRec method creates a
TSearchRec object and returns it.
This object is a wrapper for Borland VCL’s
TSearchRec structure that is used by the
FindFirst method (this method searches for files in a folder). The variable holding this structure is passed to the function as an [out] parameter. That is, the function fills the structure fields with information about the files that were found. Therefore, you should create the structure before calling
FindFirst. That is, you should call the
TSearchRec method before you call the
FindFirst routine (Writing an ordinary VCL application you would simply define a variable of this type, but since scripting languages supports Variant variables only, you should create the structure explicitly).
There is no need to remove the created
TSearchRec object. This will be done according to the common rules for working with COM objects: the object will be removed from memory when there are no references to it. This may occur for example, at the end of a function call when all the variables referring to the object are deleted.
The method is applied to the following object:
Utilities.TSearchRec method as well as the
TSearchRec object are obsolete and supported for backward compatibility only. To search for files, use the