Results 1 to 5 of 5

Thread: raising events in dll?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    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

    Visual Studio 2010

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You can't, not without using COM. However, you can use a callback function - you know, like subclassing / timers / etc.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    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

    Visual Studio 2010

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Member
    Join Date
    Jun 2005
    Location
    ottawa canada
    Posts
    41

    Re: raising events in dll?

    Is there any info or a website that explains how to use COM to raise events?
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width