Managed /unmanaged

  • Thread starter Thread starter Fredrik Wahlgren
  • Start date Start date
F

Fredrik Wahlgren

hi

I have apet aproject that i created a long time ago and I now want to make
part of it managed. This is a dtabase application s I want to create a class
in which I wrap ADO.NET. The design is such that when I make a query, I want
to send each string from the query to unmanaged code. In other words, I
simply want to call an unmanaged function from within a managed class within
the same dll.

Is there anything in particular that I should be aware of? All the articles
I have seen talk about calling an unmanaged dll from managed code.

/ Fredrik
 
You can mixes managed and unmanaged code with VC++.NET, the C++ version that
comes with VS.NET 2002 or 2003. However, it's not an easy topic and a good
book on the subject is probably the easiest way to master this topic.

If you don't want to buy a book, then you can search the Internet. For
example, on the www.codeproject.com, the search with « C++ managed » will
return many hits.

Another solution would be to use .NET Interoperability and create a COM
object from your C# code. This will give you the possibility of easily
accessing your .NET code from any language who has support for COM &
Active-X.

S. L.
 
Sylvain Lafontaine said:
You can mixes managed and unmanaged code with VC++.NET, the C++ version that
comes with VS.NET 2002 or 2003. However, it's not an easy topic and a good
book on the subject is probably the easiest way to master this topic.

If you don't want to buy a book, then you can search the Internet. For
example, on the www.codeproject.com, the search with « C++ managed » will
return many hits.

Another solution would be to use .NET Interoperability and create a COM
object from your C# code. This will give you the possibility of easily
accessing your .NET code from any language who has support for COM &
Active-X.

S. L.

The only book I have is by Kate Gregory "VS.NET 2003 Kick Start". Are there
other books you would recommend?
/ Fredrik
 
It's always hard to suggest a good book, especially for a topic as vast as
the .NET Framework. I don't have the Kate Gregory book but it should give
you a fair start about .NET Interoperability.

The books from Adam Nathan: « .NET and COM: The complete Interoperability
Guide » and Andrew Troelsen
: « COM and .NET Interoperability » looks like two very good books on this
topic (
http://www.amazon.com/exec/obidos/ASIN/067232170X/102-5766017-4616949 ;
http://www.amazon.com/exec/obidos/t...t_1/102-5766017-4616949?v=glance&s=books&st=* )
..

Also, here some articles about this subject:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/manunmancode.asp

http://msdn.microsoft.com/library/d.../cpconexposingnetframeworkcomponentstocom.asp

http://msdn.microsoft.com/library/d...nBuildingCOMComponentsForInteroperability.asp

S. L.
 
Thank you

/ Fredrik

Sylvain Lafontaine said:
It's always hard to suggest a good book, especially for a topic as vast as
the .NET Framework. I don't have the Kate Gregory book but it should give
you a fair start about .NET Interoperability.

The books from Adam Nathan: « .NET and COM: The complete Interoperability
Guide » and Andrew Troelsen
: « COM and .NET Interoperability » looks like two very good books on this
topic (
http://www.amazon.com/exec/obidos/ASIN/067232170X/102-5766017-4616949 ;
http://www.amazon.com/exec/obidos/t...t_1/102-5766017-4616949?v=glance&s=books&st=* )
 
Back
Top