473,476 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Managed event source, unmanaged event sink

Hi, I am using .NET Framework 2.0 with Visual Studio 2005 Beta Professional.
Here is the deal: Currently I have a managed class "A" (located ina C# class
library) that has a few custom events. An unmanaged C++ class "B" has a
member variable of type "A". Can class "B" directly receive the events of
class "A", and if so how (code examples)? What I mean by "directly" is can
one write code like:
m_ManagedObject->EventOccurred += gcnew EventOccurred(this,
&UnmanagedClass::EventOccurred);
without having to use some intermediary managed class that receives the
events and then calls the appropriate function of the unmanaged object?
Thanks for looking, Mario
Jul 22 '05 #1
0 1277

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

Similar topics

0
1187
by: | last post by:
I am trying to use my unmanaged c++ class library in managed classes. So far everything seems to be ok, just passing on the __events from unmanaged to managed code using the __hook functions is a...
1
1935
by: Bob Whiton | last post by:
I have an unmanaged class which has a member variable: gcroot<DataTable*> myDataTable; I would like to sink the RowDeleting event in my UNmanaged class. However, I can't declare an event...
0
1912
by: Arnaud Debaene | last post by:
Hello all. I've got a bunch of existing, non managed, C++ DLLs that export types with, among other things, public events implemented using the boost::signals library. Now, I need to have...
0
441
by: Mario Giacomino | last post by:
Hi, I am using .NET Framework 2.0 with Visual Studio 2005 Beta Professional. Here is the deal: Currently I have a managed class "A" (located ina C# class library) that has a few custom events. An...
1
1958
by: MLM450 | last post by:
I have created a .NET component in C# that has 2 interfaces. One is an incoming interface with methods being exposed to COM-aware clients. The other is an outgoing event interface that the...
1
3493
by: Apu Nahasapeemapetilon | last post by:
Hello and thank you in advance for your help. Can anyone think of a reason why this code would work properly on one PC, but not another? I've got a System.Windows.Forms.UserControl that...
6
1584
by: fshawish | last post by:
Hello all, I have a C# Class Lib that exposes a public events, methods and properties. I am referencing this ClassLib from an MFC DIalog app that is compiled with /CLR. I use gcroot<T> to...
3
2170
by: frank | last post by:
Hi I've got aplication, which one is written in unmanaged c++ with stl, i've made for it gui in managed c++. Problem becomes when I'm starting to filling up for example datagrids, when I'm...
7
5123
by: Don | last post by:
Getting errors after following the MSDN article on using VB.NET (and VS2005) for "Implementing a Managed OnSave Event Sink" for Exchange Server 2007. Not sure, but part of the problem may be that...
0
7026
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7015
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
7059
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
6822
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...
0
5306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4754
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
2967
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.