[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1146
  • Last Modified:

FindExecutable

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

Can somebody give an example ?

Thanks

Gustavo
0
voxel
Asked:
voxel
1 Solution
 
kotikCommented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now