473,698 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLL wird nicht gefunden

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...=dll%7Cimport).

Im Beispiel wird über das Attribute DllImport gearbeitet:
[DllImport("MyDl l.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.DllNotF oundException'
ist in ConsoleApplicat ion1.exe aufgetreten.
Zusätzliche Informationen: Die DLL (legacy) kann nicht geladen werden.

Obwohl ich die DLL ins Projektverzeich nis und zusätzlich ins
"Projektverzeic hnis\bin\", "Projektverzeic hnis\bin\Debug"
kopiert habe.

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

Danke und Grüße
Hubert
Nov 15 '05 #1
6 7791
On Tue, 7 Oct 2003 11:40:12 +0200, "Hubert Hermanutz"
<hh********@kav o.de> wrote:

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


Ich habe die Antwort nicht, aber kannst Du nicht einfach die DLL
kopieren, statt nach die DLL suchen zu lassen? Ich habe ueberigens
begriffen dass die zusamenarbeit swischen C++ und C# nicht immer glatt
verlauft. Du kannst besser auf Englisch schreiben, auch wenn Dein
Englisch nicht so gut ist.

--
Regards,
Patrick.
Nov 15 '05 #2
You have to know each of the method names and signatures that you want to
import. I think you might have used the attribute from the example literally
[DllImport("lega cy.dll"...)]

Create a wrapper class...

class myCDllWrapper
{
[DllImport("mydl l.dll")]
static extern int MyMethod(
int param1
)
}

use the wrapper...

class aClass
{
public int foo()
{
return myCDLLWrapper.M yMethod(10);
}

}

Hope this helps...

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

"Hubert Hermanutz" <hh********@kav o.de> wrote in message
news:en******** *****@TK2MSFTNG P11.phx.gbl...
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...=dll%7Cimport).

Im Beispiel wird über das Attribute DllImport gearbeitet:
[DllImport("MyDl l.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.DllNotF oundException'
ist in ConsoleApplicat ion1.exe aufgetreten.
Zusätzliche Informationen: Die DLL (legacy) kann nicht geladen werden.

Obwohl ich die DLL ins Projektverzeich nis und zusätzlich ins
"Projektverzeic hnis\bin\", "Projektverzeic hnis\bin\Debug"
kopiert habe.

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

Danke und Grüße
Hubert

Nov 15 '05 #3
Hi Patrick,

sorry, but i have forgotten that i should ask in english.

I wouldn't place this dll on a specific folder. I've tried to copy the dll
in several folders: "[program folder]", "[program folder]\bin" and "[program
folder]\bin\debug". But i thinking NET search on other folder. Where?

Thanks in advance,
Hubert
"Patrick De Ridder" <00*@000.00> schrieb im Newsbeitrag
news:dq******** *************** *********@4ax.c om...
On Tue, 7 Oct 2003 11:40:12 +0200, "Hubert Hermanutz"
<hh********@kav o.de> wrote:

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


Ich habe die Antwort nicht, aber kannst Du nicht einfach die DLL
kopieren, statt nach die DLL suchen zu lassen? Ich habe ueberigens
begriffen dass die zusamenarbeit swischen C++ und C# nicht immer glatt
verlauft. Du kannst besser auf Englisch schreiben, auch wenn Dein
Englisch nicht so gut ist.

--
Regards,
Patrick.

Nov 15 '05 #4
Hello Bob,

sorry, but i have forgotten that i should ask in english.

In this sample exists a wrapper class for dll accessing. But my problem is,
that the system did not founded the dll. I've tried to copy the dll in
several folders: "[program folder]", "[program folder]\bin" and "[program
folder]\bin\debug". But i thinking NET search on other folder. Where?

Thanks in advance,
Hubert
"Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > schrieb im Newsbeitrag
news:Oi******** ******@TK2MSFTN GP12.phx.gbl...
You have to know each of the method names and signatures that you want to
import. I think you might have used the attribute from the example literally [DllImport("lega cy.dll"...)]

Create a wrapper class...

class myCDllWrapper
{
[DllImport("mydl l.dll")]
static extern int MyMethod(
int param1
)
}

use the wrapper...

class aClass
{
public int foo()
{
return myCDLLWrapper.M yMethod(10);
}

}

Hope this helps...

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

"Hubert Hermanutz" <hh********@kav o.de> wrote in message
news:en******** *****@TK2MSFTNG P11.phx.gbl...
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...=dll%7Cimport).

Im Beispiel wird über das Attribute DllImport gearbeitet:
[DllImport("MyDl l.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.DllNotF oundException' ist in ConsoleApplicat ion1.exe aufgetreten.
Zusätzliche Informationen: Die DLL (legacy) kann nicht geladen werden.
Obwohl ich die DLL ins Projektverzeich nis und zusätzlich ins
"Projektverzeic hnis\bin\", "Projektverzeic hnis\bin\Debug"
kopiert habe.

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

Danke und Grüße
Hubert


Nov 15 '05 #5
The DLL can be copied to the same place as the wrapper control or be in the
search path somewhere.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

"Hubert Hermanutz" <hh********@kav o.de> wrote in message
news:uY******** ******@TK2MSFTN GP12.phx.gbl...
Hello Bob,

sorry, but i have forgotten that i should ask in english.

In this sample exists a wrapper class for dll accessing. But my problem is, that the system did not founded the dll. I've tried to copy the dll in
several folders: "[program folder]", "[program folder]\bin" and "[program
folder]\bin\debug". But i thinking NET search on other folder. Where?

Thanks in advance,
Hubert
"Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > schrieb im Newsbeitrag
news:Oi******** ******@TK2MSFTN GP12.phx.gbl...
You have to know each of the method names and signatures that you want to
import. I think you might have used the attribute from the example

literally
[DllImport("lega cy.dll"...)]

Create a wrapper class...

class myCDllWrapper
{
[DllImport("mydl l.dll")]
static extern int MyMethod(
int param1
)
}

use the wrapper...

class aClass
{
public int foo()
{
return myCDLLWrapper.M yMethod(10);
}

}

Hope this helps...

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

"Hubert Hermanutz" <hh********@kav o.de> wrote in message
news:en******** *****@TK2MSFTNG P11.phx.gbl...
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...=dll%7Cimport).
Im Beispiel wird über das Attribute DllImport gearbeitet:
[DllImport("MyDl l.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.DllNotF oundException' ist in ConsoleApplicat ion1.exe aufgetreten.
Zusätzliche Informationen: Die DLL (legacy) kann nicht geladen werden.
Obwohl ich die DLL ins Projektverzeich nis und zusätzlich ins
"Projektverzeic hnis\bin\", "Projektverzeic hnis\bin\Debug"
kopiert habe.

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

Danke und Grüße
Hubert



Nov 15 '05 #6
Hi,

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

Regards,
Hubert

"Hubert Hermanutz" <hh********@kav o.de> schrieb im Newsbeitrag
news:en******** *****@TK2MSFTNG P11.phx.gbl...
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...=dll%7Cimport).

Im Beispiel wird über das Attribute DllImport gearbeitet:
[DllImport("MyDl l.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.DllNotF oundException'
ist in ConsoleApplicat ion1.exe aufgetreten.
Zusätzliche Informationen: Die DLL (legacy) kann nicht geladen werden.

Obwohl ich die DLL ins Projektverzeich nis und zusätzlich ins
"Projektverzeic hnis\bin\", "Projektverzeic hnis\bin\Debug"
kopiert habe.

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

Danke und Grüße
Hubert

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2277
by: David Schubert | last post by:
Ich nutze PHP auf meiner Seite www.rechercheportal.de auf zwei verschiedene Arten: 1. sind sorgen kleine Scripte im Quellcode dafür, dass fix bleibende HTML-Seiten eingebunden werden (per include), 2. nutze ich php-Scripte wie unten, um Formulareingaben auf neuen Seiten darzustellen. <?php $fmtResponseScr= implode("", file("feedback.php")); foreach($HTTP_GET_VARS as $key=> $val) { $fmtResponseScr= str_replace("<$key>", $val,...
1
1954
by: Ben Butschko | last post by:
Hallo NG, ich habe folgendes Problem: In einem Formular möchte ich gerne Prüfen, ob die Variablen telefon_privat oder telefon_office gefüllt worden sind. Sinn ist, das man entweder eine Private oder eine Geschäftliche Rufnummer angeben muss. Der Benutzer kann halt aussuchen, welche von beiden er ausfüllt.
1
1565
by: Herr Herrner | last post by:
HUHU Ruf' Du den Jaschek mal an - vielleicht will er bei mir nicht ans Telefon gehen... 0178 -666- 8511 oder 040 230885
0
2397
by: Adrian Sommer | last post by:
Hallo, meine frontend-mdb lässt sich nicht mehr benutzen. Sie kann zwar geöffnet werden aber sobald ich eine Tabelle/Formular/Modul öffnen möchte erscheint die Fehlermeldung: "Es wurde festgestellt das diese Datei beschädigt ist. Um eine Reparatur zu versuchen machen Sie zunächst eine Sicherheitskopie... klicken Sie dann auf komprimieren und reparieren..."
2
2518
by: Uwe Münch | last post by:
Hallo zusammen, mal auf deutsch...: Wenn ich auf meinem W2K-Server VS.NET 2003 installiert habe, kann ich kein Projekt im dartin debuggen. Es kommt immer eine Fehlermeldung, die mir nicht viel weiterhilft:
2
1711
by: Thomas Mueller | last post by:
Hallo NG, aus irgend welchen Gründen, kann die aspnet_wp.exe nicht gestartet werden. Eigentlich hat asp.net funktioniert, warum jetzt diese Meldungen? An den Rechten hat sich nichts geändert .... Was kann ich tun, auf dem Server laufen keine asp.net Anwendungen (noch nicht)?!?! Ciao Thomas Müller Ereignistyp: Fehler
1
2426
by: Marvin Massih | last post by:
Hallo, ich möchte aus einem Webservice bzw. einer ASP.NET-Projekt einen Crystal-Report drucken. Ich brauche keinen Crystal-Viewer oder ähnlichen Käse. Doch bereits der Aufruf von ReportDocument report = new ReportDocument();
6
526
by: Bastian | last post by:
Hi, ich benutze PHP und PostgreSQL. Folgendes Problem: Eine Seite zeigt die Daten, die in einer Tabelle der DB abgespeichert sind. Der Benutzer wählt dann einen Datensatz aus, den er gerne bearbeiten oder löschen möchte. Auf der nächsten Seite wird die Aktion dann ausgeführt. Es ist möglich LOCKS zu setzen, um zu verhindern, dass sich 2 DELETES bzw. UPDATES in die Quere kommen, bzw. werden implizit gesetzt. Aber wenn ein Benutzer sich...
0
1323
by: martin | last post by:
Hallo zusammen, Ich habe mit Visual Studio 2005 for Office System ein Word Template erstellt, das unter bestimmten Bedingungen Symbolleisten erstellt. Ich habe das Template in mein C:\Benutzer und Einstellungen\..\Word\Startup Verzeichnis installiert und die Sicherheitseinträge für die DLL (.NET) vorgenommen. Ich habe jedoch folgendes seltsame Verhalten:
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9027
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.