Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: if external dll dosen't exist Delphi doen's t show any error message



Permlink Replies: 3 - Last Post: May 18, 2016 12:55 AM Last Post By: Stefano Gamberoni
Stefano Gamberoni

Posts: 5
Registered: 4/22/13
if external dll dosen't exist Delphi doen's t show any error message
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 2, 2016 2:06 AM
I need to import external dll with static method. But if dll doesn't exist Delphi doesn't show any error message. Simply application does not start!
Is there a way to get out a message that says that dll missing?
Thanks.
Cesar Romero


Posts: 462
Registered: 3/22/00
Re: if external dll dosen't exist Delphi doen's t show any error message
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 2, 2016 7:42 AM   in response to: Stefano Gamberoni in response to: Stefano Gamberoni
Stefano Gamberoni wrote:


I need to import external dll with static method. But if dll doesn't
exist Delphi doesn't show any error message. Simply application does
not start! Is there a way to get out a message that says that dll
missing?

You should load the .dll dynamically,

http://docwiki.embarcadero.com/RADStudio/Seattle/en/Libraries_and_Packages

http://delphi.about.com/od/windowsshellapi/a/delphi-dll-loading-static-dynamic.htm

[]s


Cesar Romero

Peter Below

Posts: 1,227
Registered: 12/16/99
Re: if external dll dosen't exist Delphi doen's t show any error message
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 2, 2016 11:01 AM   in response to: Stefano Gamberoni in response to: Stefano Gamberoni
Stefano Gamberoni wrote:

I need to import external dll with static method. But if dll doesn't
exist Delphi doesn't show any error message. Simply application does
not start! Is there a way to get out a message that says that dll
missing? Thanks.

Delphi has no part in this problem, it is the OS program loader that
resolves statically bound libraries before a single line of code is
executed in your application. If this is a GUI application I would
expect that you would get an error message from Window on the lines of
"application xy cannot be started since module xyz.dll cannot be found".

As stated in the other reply you got you have to use dynamic loading of
the library to get control of this problem.


--
Peter Below
TeamB

Stefano Gamberoni

Posts: 5
Registered: 4/22/13
Re: if external dll dosen't exist Delphi doen's t show any error message
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 18, 2016 12:55 AM   in response to: Stefano Gamberoni in response to: Stefano Gamberoni
Stefano Gamberoni wrote:
I need to import external dll with static method. But if dll doesn't exist Delphi doesn't show any error message. Simply application does not start!
Is there a way to get out a message that says that dll missing?
Thanks.

Thank you!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02