Board index » delphi » Call a DLl to call an EXE file

Call a DLl to call an EXE file

"David Ting" <david_tin...@hotmail.com> skrev i en meddelelse
news:3996c97c_2@dnews...

Quote
> Probably that's not the place to post this message, but this group is all
> the experts joining, so I am trying to post the message here anyway.

Try the .objectpascal or .winapi group.

Finn Tolderlund

 

Re:Call a DLl to call an EXE file


How do you call the .exe? Is it the same .exe that hosts the dll?

--

Alain Quesnel
cinqsanss...@compuserve.com

------------

Quote
"David Ting" <david_tin...@hotmail.com> wrote in message

news:3996c97c_2@dnews...
Quote
> Probably that's not the place to post this message, but this group is all
> the experts joining, so I am trying to post the message here anyway.

> We have a delphi 5 dll, inside that dll, we'll call an EXE file,
> so our delphi 5 application call the delphi5 dll to run the exe file, but
I
> always got the AV error, if we call the EXE file inside the application
> directly, everything is fine, anyone have that kind of experience?

> we can call the other DLL functions inside that DLL file, but only the
> function which is calling the EXE file

> thanks for the help

> David

Re:Call a DLl to call an EXE file


Probably that's not the place to post this message, but this group is all
the experts joining, so I am trying to post the message here anyway.

We have a delphi 5 dll, inside that dll, we'll call an EXE file,
so our delphi 5 application call the delphi5 dll to run the exe file, but I
always got the AV error, if we call the EXE file inside the application
directly, everything is fine, anyone have that kind of experience?

we can call the other DLL functions inside that DLL file, but only the
function which is calling the EXE file

thanks for the help

David

Re:Call a DLl to call an EXE file


A kind like, A is a EXE file (my developing application), B is a DLL file
(my application library file), C is a EXE file (an EXE file to do some
stuff),

When A called a procedure which is located inside the B (this procedure will
call the C),
I will have the "Access violation" error
Inside the B, I am using the Fmxutils to call the C.
the Fmxutils is a program which comes with the Delphi, and is located in the
folder as
\program files\borland\delphi5\demos\doc\FileManex

thanks

Quote
"Alain Quesnel" <cinqsanss...@compuserve.com> wrote in message

news:8n6mmd$deh2@bornews.borland.com...
Quote
> How do you call the .exe? Is it the same .exe that hosts the dll?

> --

> Alain Quesnel
> cinqsanss...@compuserve.com

> ------------
> "David Ting" <david_tin...@hotmail.com> wrote in message
> news:3996c97c_2@dnews...
> > Probably that's not the place to post this message, but this group is
all
> > the experts joining, so I am trying to post the message here anyway.

> > We have a delphi 5 dll, inside that dll, we'll call an EXE file,
> > so our delphi 5 application call the delphi5 dll to run the exe file,
but
> I
> > always got the AV error, if we call the EXE file inside the application
> > directly, everything is fine, anyone have that kind of experience?

> > we can call the other DLL functions inside that DLL file, but only the
> > function which is calling the EXE file

> > thanks for the help

> > David

Re:Call a DLl to call an EXE file


Quote
David Ting wrote in message <3996c97c_2@dnews>...
>Probably that's not the place to post this message, but this group is all
>the experts joining, so I am trying to post the message here anyway.

The .objectpascal group is a better place for this.

Quote
>We have a delphi 5 dll, inside that dll, we'll call an EXE file,
>so our delphi 5 application call the delphi5 dll to run the exe file, but I
>always got the AV error, if we call the EXE file inside the application
>directly, everything is fine, anyone have that kind of experience?

Does this function take a string parameter (e.g. the name of the program to
execute)? If so then make sure you include ShareMem as both the first unit
in your DLL and in your main application that uses the DLL. This warning is
at the top of any DLL project you create in Delphi.

--
Wayne Niddery (WinWright Inc.)
RADBooks - http://members.home.net/wniddery/
Helicopters can't fly; they're just so ugly the earth repels them.

Re:Call a DLl to call an EXE file


Yes, I have already added it in both the DLL and the Project source file,
but I still got the error,
any ideas?

thanks

"Wayne Niddery (TeamB)" <winwri...@chaffhome.com> wrote in message
news:399880c4$1_2@dnews...

Quote
> David Ting wrote in message <3996c97c_2@dnews>...
> >Probably that's not the place to post this message, but this group is all
> >the experts joining, so I am trying to post the message here anyway.

> The .objectpascal group is a better place for this.

> >We have a delphi 5 dll, inside that dll, we'll call an EXE file,
> >so our delphi 5 application call the delphi5 dll to run the exe file, but
I
> >always got the AV error, if we call the EXE file inside the application
> >directly, everything is fine, anyone have that kind of experience?

> Does this function take a string parameter (e.g. the name of the program
to
> execute)? If so then make sure you include ShareMem as both the first unit
> in your DLL and in your main application that uses the DLL. This warning
is
> at the top of any DLL project you create in Delphi.

> --
> Wayne Niddery (WinWright Inc.)
> RADBooks - http://members.home.net/wniddery/
> Helicopters can't fly; they're just so ugly the earth repels them.

Other Threads