Lisp HUG Maillist Archive

Delivery and finding DLLs

Hi all,

I have an application which uses a DLL which I will be bundling with
the delivered win32 application.  When I run the app in lispworks, I
have the DLL loaded from one directory, but when I deliver the
application, I'll want it loaded from some other location (relative to
the executable). So my question is this:  When where and how should I
perform the loading of the DLL so that I get correct behaviour for
when app is delivered and the when it is running in lispworks?  Until
recently, I had the register DLL call be on the top level of one of
the files that gets loaded, but that seems to have the side effect
that when I deliver the app, it is still expecting that DLL to be in
the same absolute location.  Any suggestions?

--
Joshua Taylor
tayloj@rpi.edu


Re: Delivery and finding DLLs

On Tue, 4 Oct 2005 16:37:11 -0400, Joshua Taylor <joshuaaaron@gmail.com> wrote:

> I have an application which uses a DLL which I will be bundling with
> the delivered win32 application.  When I run the app in lispworks, I
> have the DLL loaded from one directory, but when I deliver the
> application, I'll want it loaded from some other location (relative
> to the executable). So my question is this: When where and how
> should I perform the loading of the DLL so that I get correct
> behaviour for when app is delivered and the when it is running in
> lispworks?  Until recently, I had the register DLL call be on the
> top level of one of the files that gets loaded, but that seems to
> have the side effect that when I deliver the app, it is still
> expecting that DLL to be in the same absolute location.  Any
> suggestions?

Register the DLL without a fully qualified name, i.e. use "foo.dll"
instead of "c:\\path\\to\\whatever\\foo.dll".  If you do that the
system will try to find the DLL in a defined way:

  <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_The_Search_Path_Used_by_Windows_to_Locate_a_DLL.asp>

I've found that in most cases the best way is to put the DLL into the
LispWorks directory and for delivered applications into the directory
where your EXE is located, i.e. you deliver it together with the EXE.
(This is #1 in the link above.)

Cheers,
Edi.


Re: Delivery and finding DLLs

Unable to parse email body. Email id is 4611

Updated at: 2020-12-10 08:50 UTC