DLL in Delphi 3

How can I run an *.exe file from a DLL using Delphi 3 ?
dudufAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ronit051397Connect With a Mentor Commented:
- Open the DLL dpr.
- In Delphi Menu enter Run\Parameters\
- In the Host Application write the full path of your exe.
0
 
dudufAuthor Commented:
I am sorry but my question was not precise enough !
 The DLL has not only to run an EXE file but also to do some other work. So  I actually tried to use ExecuteFile, but it crashes the application !
0
 
ronit051397Commented:
you need to run it from code or from Delphi design mode?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
dudufAuthor Commented:
I guess the answer is 'from code' because actually it will be an already existing EXE file (written in a language I even do not know).
 
0
 
ronit051397Commented:
Did you try Winexec or CreateProcess?
0
 
dudufAuthor Commented:
I tried :
 WinExec          ; nothing happened.
 ExecuteFile      ; system crash.
 CreateProcess  ; troubles with user32.dll.
and finally ShellExecute which seems to work nicely (I have to use it a little bit more to be sure).

Thank you for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.