Groups | Blog | Home
all groups > dotnet interop > july 2003 >

dotnet interop : Loading a DLL with a dynamic path.


howard
7/7/2003 4:08:58 PM
A previous thread on this forum, dated 6/24/2003 at
4:48:36 PM, explains how to manually call LoadLibrary to
load a DLL from a full path given dynamically at runtime,
as detailed in

http://www.dotnetinterop.com/faq/?q=LoadLibrary

I have encountered the following problem when I do this:
Visual Studio can't find the symbols for the DLL, and I
can't debug into the DLL. If, for testing purposes, I
remove the call to LoadLibrary, and I hard-wire the path
in the [DllImport] attribute, Visual Studio does find the
symbols, and I can debug into the DLL.

jslin NO[at]SPAM online.microsoft.com
7/9/2003 9:30:59 AM
Create a new string value, Pdb Dirs, if you do not see it under the
following registry key:

HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build
System\Components\Platforms\Win32 (x86)\Directories

2. Double click Pdb Dirs. The Edit String dialog box will appear.
3. In the Value data edit box, add the path (or paths) to the folders
where the .pdb files are located. For example:

C:\Windows\Symbols\dll

Multiple paths are separated by the semicolon (";") character. For example:

C:\Windows\Symbols\dll;C:\Windows\Symbols\ocx

4. Click OK to close the Edit String dialog box.


Thanks

Jian Shen

This posting is provided "AS IS" with no warranties, and confers no rights.

AddThis Social Bookmark Button