As has been pointed out, the only way to make native classes available to
managed code is to write managed adapters (you'll likely have to change
attributes or behaviour slightly, so they're usually more than
just "wrappers").
In C++/CLI, you can simply write managed classes and instantiate and us
Hi Mark,
Add the c++ dll into your project as a reference. Then add the directive to
the c++ dll such as using com.mydll; Then use the methods of the dll.
If you have further questions, please send me an email at
[EMAIL PROTECTED]
Kara
On Nov 16, 2007 11:24 AM, Mark Nicholls <[EMAIL PROTECTED
> http://www.adp-gmbh.ch/csharp/call_dll.html
I had a problem with DllImport() on 64bit .NET with .NET 2.0: it
appears as if a normal C dll can't always lead to a proper application with
DllImport on 64bit, despite the fact that it was compiled with 64bit flags
(the c dll), it lead to an i
http://www.adp-gmbh.ch/csharp/call_dll.html
-Original Message-
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Nicholls, Mark
Sent: 16 November 2007 16:46
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] calling c++ dll from C
P.COM
Subject: Re: [ADVANCED-DOTNET] calling c++ dll from C#
If your DLL is a COM DLL you could consider using interop.
Also you can write a C++/CLI component which allows access to managed &
unmanaged code, create a managed (ref) class and call unmanaged code
from it.
-Origina
MAIL PROTECTED] On Behalf Of Mark Nicholls
Sent: 16 November 2007 16:25
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] calling c++ dll from C#
Hello,
can someone give me some advice about calling a unmanaged C++ dll from
C#.it also uses templates from the STL..it all so
Hello,
can someone give me some advice about calling a unmanaged C++ dll from
C#.it also uses templates from the STL..it all sounds a bit
horribleany adviceor (good) articles on the web somewhere.
===
This list is hosted by DevelopMentorĀ® http://www
We use mixed-mode wrappers to our native c++ libraries.
-Original Message-
From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf
Of Mark Nicholls
Sent: Friday, November 16, 2007 10:25
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] calling c
: [ADVANCED-DOTNET] calling c++ dll from C#
Okseems reasonable...
So you manually effectively decorate the unmanaged C++ code with managed
codewhich you then in turn can call from C#?
Any good referenceI did find
http://www.codeguru.com/cpp/cpp/cpp_managed/interop/article.php
If the API you want to call into uses STL containers, you're not gonna
be able to write P/Invoke declarations for it. Perhaps this is a
non-issue, since such classes / functions can't be exported anyway.
===
This list is hosted by DevelopMentorĀ® http://www.develop.
CED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] calling c++ dll from C#
If the API you want to call into uses STL containers, you're not gonna
be able to write P/Invoke declarations for it. Perhaps this is a
non-issue, since such classes / functions can'
of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin Palmer
Sent: 16 November 2007 16:56
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] calling c++ dll from C#
A better way is to create .NET wrappers (as I mentioned earlier).
You create a .NET class
Palmer
Sent: 16 November 2007 16:53
To: 'Discussion of advanced .NET topics.'
Subject: RE: [ADVANCED-DOTNET] calling c++ dll from C#
http://www.adp-gmbh.ch/csharp/call_dll.html
-Original Message-
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On
13 matches
Mail list logo