I tried the following code and got no error. Maybe it's not that...

<code>
var F:TSearchRec;
    status:Integer;
begin
  status := FindFirst ('&!3485', faAnyFile, F);
  while status = 0 do
    begin
    status := FindNext (F);
    end;
  FindClose (F);
end.
</code>

David J Taylor wrote:
> Cosmin Prund wrote:
>   
>> Ask for more info on the error, like window caption, window style,
>> context. Use the provided info to guess rather the error is
>> externaly-produced (windows produced) or is produced directly by your
>> application, using ether ShowMessage or "raise Exception".
>>
>> The list of things to do goes on and on for ever... Provide more info
>> if you need more assistence.
>>     
>
> The one place where I think there /might/ be an error is in calling 
> FindFirst with a non-existant directory.  This is the code, and I don't 
> think it should cause the error, but who knows!
>
>   status := FindFirst (filename, faAnyFile, F);
>   while status = 0 do
>     begin
>     sl.Add (F.Name);  // sl is a TStringList
>     status := FindNext (F);
>     end;
>   FindClose (F);
>
> Any question that the FindClose shouldn't be called if the FindFirst 
> fails?
>
> Thanks,
> David 
>
>
> __________________________________________________
> Delphi-Talk mailing list -> Delphi-Talk@elists.org
> http://www.elists.org/mailman/listinfo/delphi-talk
>
>   

__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to