Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Peter Ritchie
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread kara hewett
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Frans Bouma
> 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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Kevin Palmer
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Nicholls, Mark
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Kevin Palmer
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

[ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Mark Nicholls
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Alex Ivanoff
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Kevin Palmer
: [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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Nassar, Anthony
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.

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Nicholls, Mark
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'

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Nicholls, Mark
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

Re: [ADVANCED-DOTNET] calling c++ dll from C#....

2007-11-16 Thread Kevin Palmer
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