CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    9

    Is it possible to fire events from a second thread?

    Hi!
    Is it possible to fire events from
    a second thread?
    When my event handler in Excel includes the string like " Cells(2,2).Value = MyObj.MyProp"
    it becomes suspended! MyObj is my full control which fires an event from a second thread.
    But the same component works fine in VB 6.0 !
    Thanks in Advance!



  2. #2
    Guest

    Re: Is it possible to fire events from a second thread?

    You need to marshal the IDispatch pointers (that you fire events back on) with CoMarshalInterThreadInterfaceInStream in the main thread and then unmarshal with
    CoGetInterfaceAndReleaseStream in the second thread.


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

Featured