|
-
April 2nd, 2009, 03:31 PM
#10
Re: Linking to an external DLL
 Originally Posted by ThermoSight
That however, leads to another question: if the DLL is referenced dynamically, that is at run-time, then the executable has to know where the DLL resides, i.e. what folder it is found in, but at first glance there doesn't seem to be any means of specifying the location of the DLL.
Now, here at the house I have 'n' machines on the network (where 'n' is an integer between 3 and no particular upper limit). If I place the DLL in a folder on the machine I build the application on (say, the \build\debug folder), will the application work if I place the app and the DLL in a different folder on a different machine (say, C:\apps) ?
When you use P/Invoke you can specify an absolute path to the DLL. If the path is not absolute, the operating system will look for the DLL beginning at the directory where your application is running. It is a standard procedure to either deploy the DLL and the .NET application to the same 'bin' folder. You can also setup an environment variable for the location of the DLL. Well...there are loads of options.
 Originally Posted by ThermoSight
I dunno .... your guess is as good as mine. (I think I prefer the older-style libraries ... they were so easy to understand and work with)
I've done quite a bit of programming over the years (Pascal, LISP, C/C++, VC++, COM) and now C#/.NET. I cannot see how the old style is better... I'm fond of C/C++ particulary with STL but I'll take C# and .NET everyday!!
Last edited by nelo; April 2nd, 2009 at 03:32 PM.
Reason: Error in sentence
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|