Re: Converting event handling from VC++ 2005 to VC++ 2008
- From: "Roman Ryl..." <ryltsov@xxxxxxxxx>
- Date: Tue, 13 Jan 2009 07:29:22 -0800 (PST)
Boris,
I'm converting a software from VC++ 2005 to VC++ 2008. As VC++ 2008
doesn't support attributes anymore I got rid of them everywhere. However I
wonder if I need to get rid of the keywords __hook, __unhook and __raise,
too. I guess I need to replace them with something else. Does anyone know
a webpage with a short description of how to replace these keywords with
code? I'm fine with a very simple description as the rest I can then
hopefully figure out myself.
You can turn on generation of C++ source code for attributed source
and see yourself what code is substituted in place of __hook etc.
If you mean COM events, hook/unhook will be connecting to connection
point (IConnectionPoint::Advise explicit or wrapped into some class),
for a __raise you will need a helper class IDE typically [re-]
generates for a dispinterface through Class View and you inherit your
class from it. Then your ATLVERIFY(SUCCEEDED(__raise Event(123)));
will be ATLVERIFY(SUCCEEDED(Fire_Event(123)));
Roman
.
- Follow-Ups:
- References:
- Prev by Date: Re: Keeping DLL running in dllhost running
- Next by Date: Re: Converting event handling from VC++ 2005 to VC++ 2008
- Previous by thread: Converting event handling from VC++ 2005 to VC++ 2008
- Next by thread: Re: Converting event handling from VC++ 2005 to VC++ 2008
- Index(es):
Relevant Pages
|