DLL wird nicht gefunden

  • Thread starter Hubert Hermanutz
  • Start date
H

Hubert Hermanutz

Hallo,

ich möchte ein kleines Testprogramm erstellen, dass auf eine Visual C
(Studio 6.0) DLL zugreift. Bevor ich damit beginne wollte ich die
notwendigen Schritte, anhand eines Beispiels nachvollziehen.
(http://www.codeproject.com/useritems/interop.asp?target=dll|import).

Im Beispiel wird über das Attribute DllImport gearbeitet:
[DllImport("MyDll.dll",...)]
public static extern unsafe void Test(IntPtr ptr);

Wenn ich das Beispiel ausführe, erhalte ich die Fehlermeldung:
Eine nicht behandelte Ausnahme des Typs 'System.DllNotFoundException'
ist in ConsoleApplication1.exe aufgetreten.
Zusätzliche Informationen: Die DLL (legacy) kann nicht geladen werden.

Obwohl ich die DLL ins Projektverzeichnis und zusätzlich ins
"Projektverzeichnis\bin\", "Projektverzeichnis\bin\Debug"
kopiert habe.

Wo lege ich fest in welchem Verz. die DLL sich befindet.

Danke und Grüße
Hubert
 
H

Hubert Hermanutz

Hi,

i could solve the problem. This DLL required MFC42d.dll and this one was not
available on my Computer.

Regards,
Hubert
 

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