DLL in Delphi 3

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

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

- Open the DLL dpr.
- In Delphi Menu enter Run\Parameters\
- In the Host Application write the full path of your exe.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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 !
you need to run it from code or from Delphi design mode?
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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).
Did you try Winexec or CreateProcess?
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.