DLL was not founded

  • Thread starter Hubert Hermanutz
  • Start date
H

Hubert Hermanutz

Hi,

i will develop a application with C#, which implement a VC++ dll. Previous i
have looked the sample:
(http://www.codeproject.com/useritems/interop.asp?target=dll|import).

This sample using follow attribute:
[DllImport("MyDll.dll",...)]
public static extern unsafe void Test(IntPtr ptr);

But when i start the sample theres got a Exception:
System.DllNotFoundException, altrought i have copied the DLL in follow
folders: "[program folder]", "[program folder]\bin" and "[program
folder]\bin\debug".

Must i places the DLL in other folders?

Thanks in advance,
Hubert
 
C

Cowboy \(Gregory A. Beamer\)

If you recompile the DLL, you either have to recompile the project that
consumes it or specify in the .config file that it can use a newer version.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

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