That solution is good, but I need to send a message to delphi Form from delphi DLL, and delphi Form reply's a message
the (comServer) DLL sends messages to delphi Form (thepathandfilenametobeexe
cuted), and then delphi Form answers YES, so the DLL accepts what delphi Form instructed.
var ShellExecuteInfo: TShellExecuteInfo):HResult
var Filename: String;
//send a message to Delphi Form the >Filename (sample: c:\windows\notepad.exe)
//Receives the messages from delphi Form > 0 or 1
//Result := From Delphi Form
Anyone can answer the question too.
Note: I'm not making any malicious form of program, if I am doing it, I should use the findfirst findnext and not during execution time.
The point of this question: is to get the path and filename before the application is launch for some good reasons.
So, 2 codes will be shown here, the Delphi DLL code for sending the filename, and a Delphi Form accepting the messages from the DLL, and then reply's (0 or 1)