[vbox-dev] Multiple-thread apartment (MTA) conflicts with OLE drag/drop?
Knut St. Osmundsen
bird at sun.com
Wed May 20 00:08:52 PDT 2009
On May 15, 2009, at 19:32, Huihong Luo wrote:
> Seems this is a known issue on windows host, any ideas to fix it?
> Currently, VirtualBox.exe requires MTA to operate correctly, but OLE
> Drag/Drop requires Single-thread apartment (STA) threading model.
> I tried a few things for a few days, but not working. With STA,
> virtualbox.exe accepts ole drops, but it will crashes at some point.
> With MTA, drag/drop does not work.
> This is a major obstacle to implement dnd.
We have been aware of this ever since we switched to Qt4 since it uses
the OLE Clipboard API. The problem was reported to Trolltech but they
didn't have any constructive feedback for us. We've since created a
workaround for the OLE API where the problematic API calls are routed
to a thread running in an STA. I'm not entirely sure if this
workaround can be extended to the OLE Drag/Drop API, but I sure hope
so. :-) I'll try find out whether we're allowed to publish the
workaround or not.
More information about the vbox-dev