DllImport issue!

C

chandan

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
 
M

Mattias Sjögren

Is there any way to pass the relative path of dll to the DllImport
attribute??

Why don't you put the DLL in the application directory and reference
it by just specifying the file name?


Mattias
 
M

Michael C

chandan said:
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.!!!

You can call LoadLibrary yourself I believe. In DllImport just specify the
dll with it's name only. Then call LoadLibrary specifying the full path.
Just make sure you call FreeLibrary for each time you call LoadLibrary. This
works in other languages so I presume it will in dot net. Although I would
be suprised if there wasn't a built in method of doing this.

Michael
 
P

Pavani.Budumuru

Hi! All we have working with "Audio Restoration" application, in that
application we need to develop .avi files noise clarification using "audio
restoration" software. First we need to download .avi files from cam to PC
drivers, then we apply "audio restoration" software and do the audio
process. After that we need to save the .avi files in same location in PC
hard drive and also copy the restored files back to the camera over-writing
the unprocessed file. So we need to develop the "Audio Restoration"
software. Is this requirement fullfiled by using ASP.Net 2.0 framework.
Please tell us any information about our application requirement.

Thanking you.

Regards,
Development team.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top