Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

DllImport issue!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chandan - 29 Sep 2007 08:04 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.