DllImport issue!

  • Thread starter Thread starter chandan
  • Start date Start date
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
 
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
 
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
 
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.
 
Back
Top