-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: SBK
Message 2 in Discussion
Arshad,<o:p></o:p>
<o:p> </o:p>
Put the dll in winNT/System32 folder or give the dll file path
in the [DllImport("Spy.DLL")] attribute.<o:p></o:p>
<o:p> </o:p>
sb<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
S.B.Kar <o:p></o:p>
<o:p></o:p>
Senior Systems
Engineer<o:p></o:p>
GMSBU<o:p></o:p>
Wipro
Technologies<o:p></o:p>
Ph#5539134 Extn:
4434<o:p></o:p>
<o:p> </o:p>
-----Original Message-----
From: Iamtheoneurwarnedabout
[mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003
4:02 PM
To: BDOTNET
Subject: How to call C++ DLL in C#
<o:p> </o:p>
<o:p></o:p>
<o:p></o:p>
New
Message on BDOTNET<o:p></o:p>
<o:p></o:p>
<o:p> </o:p>
How to call C++
DLL in C#<o:p></o:p>
Reply
<o:p></o:p>
<o:p></o:p>
Reply to Sender Recommend
<o:p></o:p>
Message 1 in
Discussion <o:p></o:p>
<o:p></o:p>
From: Iamtheoneurwarnedabout <o:p></o:p>
<o:p> </o:p>
Hi All gurus !!!<o:p></o:p>
<o:p></o:p>
I have a C++ DLL, I want to call it in C#. Ofcourse, I
have used as [DllImport("Spy.DLL")] in C#, also declared the
function as a private member. Later I called that function in some event
handler function. Over all it looks some thing similar to this:<o:p></o:p>
Fact:<o:p></o:p>
The
below 2 lines I have decalred in the begining...<o:p></o:p>
[DllImport("Spy.DLL")]<o:p></o:p>
private static
extern bool
ShutDown();<o:p></o:p>
Iam calling the function in some event....<o:p></o:p>
bool bln = ShutDown();<o:p></o:p>
Problem:<o:p></o:p>
When
I ran the application, Iam getting an error saying that "Unable to
load the DLL".<o:p></o:p>
Note:
I also put the Dll in the working path of my C# application.<o:p></o:p>
<o:p></o:p>
Can
anyone please suggest me how to load the DLL in C#. I tried using
LoadLibrary(), but no use. <o:p></o:p>
I
will be greatful to you if u can help me out of this..<o:p></o:p>
Cheers,<o:p></o:p>
Arshad<o:p></o:p>
<o:p></o:p>
View other groups in this
category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]