Hi All,
I have a dll created using vc++(Unmanaged).So when we are using this
I have to give to full path of this dll as a parameter of DllImport
attribute. The parameter takes only const string value. It will work
fine by hard coding, but what will be case when I deploy this project?
Is there any way to pass the relative path of dll to the DllImport
attribute??
Let me know if more clarification is required about the problem.!!!
Thanks in advance!
Chandan Kumar
Family Tree Mike - 29 Sep 2007 13:41 GMT
I don't believe so. Think about where it refers to... Would it be relative
to the current directory or the executable?
If you put the dll in a folder that is one of the defaults in the search,
you should not have problems because you don't need to specify the full path,
just the DLL name. The default search works in this order:
1. The directory from which the application loaded.
2. The system directory.
3. The Windows directory.
4. The directories that are listed in the PATH environment variable.
> Hi All,
>
[quoted text clipped - 11 lines]
>
> Chandan Kumar