FindExecutable

I am having problem with the parameter passing of FindExecutable API function.

Can somebody give an example ?

Thanks

Gustavo
voxelAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
kotikConnect With a Mentor Commented:
I think this will help:

You have to allocate memory for the FileName variable:
var
FileName: PChar;
begin
FileName = GetMem(255);
FindExecutable(

    PChar('app.exe'),      // pointer to string for filename
    PChar('/'),      // pointer to string for default directory
    FileName      // pointer to buffer for string for executable file on return
   );
end;

Regards,
Kot
0
All Courses

From novice to tech pro — start learning today.