473,473 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Wrapped C++ versus Delegate


Hi,

A question: is wrapping a C++ class with a Managed_C++ shell the same as
using a Delegate ?
Thank you.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
1 1057
Saya,

The question that you present doesn't make much sense, as a delegate and
a managed wrapper are two separate things.

Wrapping a C++ class using Managed C++ is a way to expose native C++
class code to managed code.

Delegates are type-safe function references. The two are very different
things.

The only way that they are similar is that they can expose
managed/unmanaged code to the opposite of what they are. In other words,
the Managed C++ wrapper exposes unmanaged code to the native world, and the
delegate can be passed through the P/Invoke layer (as a function pointer) to
expose managed code to the unmanaged world.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Saya" <an*******@devdex.com> wrote in message
news:uA**************@TK2MSFTNGP11.phx.gbl...

Hi,

A question: is wrapping a C++ class with a Managed_C++ shell the same as
using a Delegate ?
Thank you.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2

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

Similar topics

8
by: Chris | last post by:
Hi, what is the added value of using the 'event' keyword ? have a look at following (working) code please (you can just copy/paste and build it) : using System; public delegate void...
1
by: Daniel Bass | last post by:
hey guys. overview --------- I'm designing a messaging system that works on the principle of late binding to the I/O objects, depending on the .Net class libraries present in the local folder....
3
by: Minh Khoa | last post by:
Please give me more information about delegate and its usage? Why do i use it and when?
0
by: Dave | last post by:
Hello The application I'm building an installer for uses dlls which were developed originally in C. Since the application itself is developed in C#, these dlls were wrapped using SWIG....
7
by: Ant | last post by:
Hello, Very simple question but one I need clarified. Which part of the statement below is considered the 'delegate'? Is it the 'new System.EventHandler' or the btnAccept_Click? or is it...
6
by: kalishandy | last post by:
I have the following code to tie up a custom delegate (ConsoleDelegate) with two methods from a separate class called CallMyEvents: static void Main() { CallMyEvents call = new CallMyEvents();...
2
by: =?Utf-8?B?aGVyYmVydA==?= | last post by:
What are the different features (in VB.NET) between a) Custom Events and b) Multicast Delegates to raise events? On the bottom line my class ad a) manages a list of handlers or ad b) obtains a...
2
by: =?Utf-8?B?TW9vcmUgV29ya3M=?= | last post by:
Howdy All, I don't understand how to correct an error I encounter when trying to control GridView DataBound data flow. error CS0123: No overload for 'GridView2_DataBound' matches delegate...
26
by: raylopez99 | last post by:
Here is a good example that shows generic delegate types. Read this through and you'll have an excellent understanding of how to use these types. You might say that the combination of the generic...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.