PC Review


Reply
Thread Tools Rate Thread

Calling managed CSharp code from a C++ dll

 
 
Justin Galzic
Guest
Posts: n/a
 
      28th Jun 2004
I have a dll written in C++ running along in my exe and would like to
call an API from the dll into the managed code portion of my exe,
which is written in C#. I know that you can call a function in the C++
dll by using the DllImport statement and declaring a P/Invoke
compatible API signature for the managed portion to call into the
unmanaged portion. But can you do the reverse? Essentially, what I
want to do is have the C# section provide an particular function as a
callback to the C++ dll so when it is ready to perform a certain task,
it makes a call to the callback function provided in the C# section
(which can be made into a dll). Is this possible? If so, can anyone
give me suggestions on where to start?

Thanks in advance,
Justin
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling managed code form unmanaged code Martin Groh Microsoft VC .NET 7 7th Jan 2009 10:44 PM
Reference and tutorials using/calling native code (dll) from managed code app Mario Microsoft Dot NET Compact Framework 2 2nd Aug 2006 05:06 PM
Calling Managed Code From Unmanaged Code, System.DllNotFoundException batista Microsoft C# .NET 1 2nd Nov 2005 07:00 PM
Csharp calling C++ Managed code using Byte array reference =?Utf-8?B?VHJldg==?= Microsoft Dot NET 1 31st Oct 2004 07:49 PM
a question about calling unmanged code from managed code chaor Microsoft C# .NET 2 16th Jun 2004 05:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 PM.