Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] ActiveX fire event fails in multithreading mode (with AfxBeginThread)

Hi,

    a try to integrate an activex component into Eclipse. Followings:

1. Create a simple activex control and a simple java plugin.
2. Define a simple fire event in the activex control. ( e.g. void
FireTest() )
3. Start in the activex control a new thread with "AfxBeginThread".
4. Define in the plugin a simple eventhandler for this event.
    (e.g.
        controlSite.addEventListener(1, new OleListener() {
            public void handleEvent(OleEvent event) {
                Shell shell = parent.getShell();
                MessageDialog.openInformation(shell, "activex fired me",
"");
            }
        });
    )
5. In the new afx thread try to call the fire event. It will fail. If
you
try to call this fire event from the main thread of the activex control
it
succeded, but from the new afx thread it will fail.

Any thoughts?
Andras Lang



Back to the top