Solved

FindExecutable

Posted on 2000-03-21
1
1,085 Views
Last Modified: 2008-03-17
I am having problem with the parameter passing of FindExecutable API function.

Can somebody give an example ?

Thanks

Gustavo
0
Comment
Question by:voxel
1 Comment
 
LVL 2

Accepted Solution

by:
kotik earned 10 total points
ID: 2641366
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Machine not responding during CopyFile() 3 98
Magic Software info 18 130
How to define IfThen functions in one common unit? 4 50
Delphi: Connect to running MS Outlook 4 80
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

786 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