473,386 Members | 2,114 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,386 software developers and data experts.

.NET COM object with events used in C++

I need to create a COM object (in C#) that both has methods a client
can call and events that a client can receieve. The client will be
written i C++. I have already made it possible to call methods
(setting ComVisible, using GAC og regasm), but I have no solution for
the events.

What is the best way of doing this? I have been looking at IDispatch
and IConnectionPoint, but I can not find any runnable examples that
shows me a proof-of-concept that I can continue to build on.

any help appriciated
S

Sep 7 '07 #1
2 1686
st***@hokum.net wrote:
I need to create a COM object (in C#) that both has methods a client
can call and events that a client can receieve. The client will be
written i C++. I have already made it possible to call methods
(setting ComVisible, using GAC og regasm), but I have no solution for
the events.

What is the best way of doing this? I have been looking at IDispatch
and IConnectionPoint, but I can not find any runnable examples that
shows me a proof-of-concept that I can continue to build on.

any help appriciated
S
check this out:
http://samples.gotdotnet.com/quickst...tClient_2.aspx

HTH,
Petar Atanasov
http://a-wake.net
Sep 10 '07 #2
On Sep 10, 1:22 pm, Petar Atanasov <ppa_i...@mail.bgwrote:
st...@hokum.net wrote:
I need to create a COM object (in C#) that both has methods a client
can call and events that a client can receieve. The client will be
written i C++. I have already made it possible to call methods
(setting ComVisible, using GAC og regasm), but I have no solution for
the events.
What is the best way of doing this? I have been looking at IDispatch
and IConnectionPoint, but I can not find any runnable examples that
shows me a proof-of-concept that I can continue to build on.
any help appriciated
S

check this out:http://samples.gotdotnet.com/quickst...op/TestClient_...

HTH,
Petar Atanasovhttp://a-wake.net
Thank you for your answer, but I can not find any reference to events
in the link you sendt me. Only normal method/function calls.

S

Sep 11 '07 #3

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

Similar topics

3
by: VijayShankar | last post by:
Can u be more specific on your question Anyway its not like Session variables are available for sometime and not available for sometime. When your session starts it is very much available...
6
by: Joe Kelsey | last post by:
When you use addEventListener (or addEvent in IE) to call an object method, does it call it with the correct this parameter? The ECMAScript reference has a lot to say about the caller using...
7
by: Bryan D. | last post by:
Our application makes extensive use of C#'s event handling mechanism to communicate between classes. A problem has cropped in that it becomes difficult to know for sure that all observers of an...
15
by: Tim Jarvis | last post by:
Hi, I have an object that I am binding to a text box, this object exposes a boolean field, and I have implemented a format event handler and a parse event handler for the binding object, where I...
12
by: Ricardo Pereira | last post by:
Hello all, I have a C# class (in this example, called A) that, in its constructor, starts a thread with a method of its own. That thread will be used to continuously check for one of its...
2
by: SimonZ | last post by:
In ASP.NET 2.0, C# I can see object events only in design view. That is very disturbing. I don't use design view at all. I work with source view and code behind. If you change language to...
5
by: Michael Moreno | last post by:
Hello, In a class I have this code: public object Obj; If Obj is a COM object I would like to call in the Dispose() method the following code: ...
16
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener...
7
by: dwandless | last post by:
I have successfully installed a BHO in IE7. Using C#. Now I'm trying to figure out how to trap various events. onkeypress, oncut, oncontextmenu, etc. I have tried calling in various...
11
by: Jay Dee | last post by:
Object garbage collection of events I can not help wondering how the garbage collection system handles events. If I release all references to an object that has a void that an event somewhere...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.