PDA

Click to See Complete Forum and Search --> : raising events in dll?


softwareguy74
Jan 9th, 2001, 01:16 AM
Hi,

I'm developing a dll in C++ and just thought about something.. In Visual Basic, you can create objects that raise events in the client app that instantiated the object.

In Visual Basic, the object raises the event by:

RaiseEvent EventName

But in C++, how do you define an event and then raise it in the client using the object?

Any help would be appreciated..

Dan

parksie
Jan 9th, 2001, 12:18 PM
You can't, not without using COM. However, you can use a callback function - you know, like subclassing / timers / etc.

softwareguy74
Jan 9th, 2001, 01:58 PM
So COM is not available in C++? I thought it was a universal standard? So in VB, I guess the fact that you're creating an "ActiveX" dll makes it COM? But what about in C++? Can you make an "ActiveX" dll?

I you or any one else has any examples or info, I'd really appreciate it..

Dan

parksie
Jan 9th, 2001, 02:43 PM
I said not without using COM. As in - you'd have to use COM to do it from C++.

VB uses COM to do it - there's no other easy way.

nima1985
Jul 14th, 2005, 08:27 AM
Is there any info or a website that explains how to use COM to raise events?
thanks