473,387 Members | 1,374 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,387 software developers and data experts.

Using unified Event Handling mechanism for COM events

Hi all,

Where can I get some insight on using the __hook, __unhook, event_source and
event_receiver for specifically COM events. The documentation given in MSDN
is very minimal. I have the following scenario

Server (COM event source) is written in VC++ 6.0 using ATL (event interfaces
can be either dispinterface / IDispatch based)
Client (COM event receiver) is written in VC++ 2003 using attributed
programming and unified event handling
I ran into many compilation problems for the client (C3712, "a custom
interface that fires COM events cannot inherit from IDispatch", etc).
Finally, after doing a lot of trial and errors, I am able to compile the
client. But I am not getting the events.

Also, I am trying to write an Addin in to Office applications using VC++
2003. I would like to use the unified Event handling __hook and __unhook
functions. The first problem I faced was the #import'ing the OLB file. It
looks like the new compiler does not like these OLB's when imported with
"embedded_idl". Some of the compiler errors are C3319 (propget and propput
methods), C3317, C3303 (again propget and propput), C3139 (export empty
UDT's), C3110 (again propget and propput methods).

Has anybody tried this before? Or is it too early to use unified event
handling mechanism? should we defer using __hook and __unhook till the
Service pack for VS.Net 2003 comes out?

Any recommendations please.

Thanks
Ashok Kumar K
Nov 17 '05 #1
3 2052
Hi Brain,

Thanks for the links. These threads are more than a year old. Is it still in
this state with the current VS.NET 2003 release? Are there any patches, SP
that will fix these problems? Is MS planning to release a SP for VS.NET 2003
or is it going to be only upgrade to VS.NET 2005 (probably with more
problems!)??

Thanks
Ashok Kumar K

"Brian Muth" <bm***@mvps.org> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
The unified event handling is extremely buggy, and should be avoided
altogether.

See:

http://groups.google.com/groups?thre...btinternet.com
http://groups.google.com/groups?thre...%40tkmsftngp04
http://groups.google.com/groups?thre...tngp13.phx.gbl

Brian

Nov 17 '05 #3
> Thanks for the links. These threads are more than a year old. Is it still
in
this state with the current VS.NET 2003 release?
Yes.
Are there any patches, SP that will fix these problems?
None yet.
Is MS planning to release a SP for VS.NET 2003 or is it going to be only upgrade to VS.NET 2005 (probably with more problems!)??


I'm pretty sure a SP is in the works, but the release date is unknown, and
whether the bugs described in these posts will be addressed is also unknown.

In the meantime, the consensus amongst the experts is to avoid using the
unified event handling.

Brian
Nov 17 '05 #4

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

Similar topics

7
by: pysim | last post by:
Hi, I have a couple of general requests for pointers to python examples and design advice. I'm looking for examples of MVC-based GUI controls done in python (model-view-controller). Also,...
3
by: Nick Allen | last post by:
After using ndiff from difflib, the function restore would return the sequence that generated the delta. Unfortunately, restore does not do the same for unified_diff. I do not see any similar...
4
by: Josh Usovsky | last post by:
I'm setting up a watched folder using FileSystemWatcher. When I drop a small file into the watched folder, I can respond to a .Created event and process the file with other code. However, if I try...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
18
by: Elder Hyde | last post by:
Hey all, A class of mine needs to tell the outside world when its buffer is not empty. The problem is that C# seems to force you to put the event-raising code in the base class. To illustrate,...
6
by: Steve B. | last post by:
Is it good programming practice to call an event within an event? I'm I creating recursion somehow somewhere? Does an event (e.g. send, e) ever end? I'm sorry, I'm not sure I know what I mean,...
2
by: Wavemaker | last post by:
The canonical way of declaring delegates for events is to include a parameter representing the sender as well as an EventArgs derived class (or EventArgs itself) as the second parameter...
5
by: Russell Smallwood | last post by:
Hello all, Why can't I wire up an event during the "Raise PostBackEvent" stage of a postback? Just in case this is the wrong question, the situation: deep in the bowls of some code-behind...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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...

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.