473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Managed /unmanaged

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
Nov 17 '05 #1
4 1143
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.

"Fredrik Wahlgren" <fr****************@mailbox.swipnet.se> wrote in message
news:un**************@TK2MSFTNGP11.phx.gbl...
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

Nov 17 '05 #2

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:OI**************@TK2MSFTNGP10.phx.gbl...
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
Nov 17 '05 #3
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/AS...766017-4616949 ;
http://www.amazon.com/exec/obidos/tg...e&s=books&st=* )
..

Also, here some articles about this subject:

http://msdn.microsoft.com/library/de...nunmancode.asp

http://msdn.microsoft.com/library/de...nentstocom.asp

http://msdn.microsoft.com/library/de...perability.asp

S. L.

"Fredrik Wahlgren" <fr****************@mailbox.swipnet.se> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:OI**************@TK2MSFTNGP10.phx.gbl...
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

Nov 17 '05 #4
Thank you

/ Fredrik

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:eP**************@TK2MSFTNGP15.phx.gbl...
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/AS...766017-4616949 ;
http://www.amazon.com/exec/obidos/tg...e&s=books&st=* ) .

Also, here some articles about this subject:

http://msdn.microsoft.com/library/de...nunmancode.asp
http://msdn.microsoft.com/library/de...nentstocom.asp
http://msdn.microsoft.com/library/de...perability.asp
S. L.

"Fredrik Wahlgren" <fr****************@mailbox.swipnet.se> wrote in message news:eS**************@TK2MSFTNGP12.phx.gbl...

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:OI**************@TK2MSFTNGP10.phx.gbl...
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


Nov 17 '05 #5

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

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
1
by: Eric Twietmeyer | last post by:
Hello, I'm starting to investigate cs, managed c++ and interoperating with a very large unmanaged code base. We are going to use Windows Forms (written in cs) to replace our old fashioned GUI. ...
5
by: Chris Kiechel | last post by:
I am writing a .NET Windows application and it needs to perform DDE calls to a legacy system. I created a C++ unmanaged class that performs the actual DDE connection and communication. However,...
3
by: zhphust | last post by:
I want to convert a object of a managed class to a unmanaged structure that has the same member with that managed class. Can anybody tell me how i can do it? Thanks in advance. -- zhphust...
3
by: Thorsten | last post by:
HI I'm a C# developer and unfortunately I have to write now some code in managed and unmanaged C++. In this area I'm Newbie and therefore please forgive me if this is a really simple...
13
by: bonk | last post by:
Hello, I am trying to create a dll that internally uses managed types but exposes a plain unmanaged interface. All the managed stuff shall be "wrapped out of sight". So that I would be able to...
12
by: doug | last post by:
I understand the basics of what managed code offers and that you open yourself up to security issues if you allow unmanaged code. We already have a decent amount of VB6 code to include COM DLLs. ...
6
by: nicolas.hilaire | last post by:
Hi all, i'm not totally clear with some concepts about managed and unmanaged code. I'm asking myself some questions : - i've a MFC app, i want to use the framework dotnet by switching to...
9
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for...
25
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.