什么是“OLE应用程序称为为不同线程编组的接口”后调用RevokeDragDrop的意思? [英] what does "OLE The application called an interface that was marshalled for a different thread" after calling RevokeDragDrop mean?
问题描述
我仍在尝试找出此问题的答案。我将欣赏向正确的方向微移(因为我在OLE的经验很少)。
p>您将封送接口传递到另一个公寓。尝试调用方法会显示此错误,并且调用中止时出现此错误
RPC_E_WRONG_THREAD
。 多线程上的接口指针。如果你打算使用一个你已经持有的不同线程的指针,你必须考虑你是否允许,或者你需要显式的编组/解组指针的使用,例如。与 CoMarshalInterThreadInterfaceInStream
函数。
我想问题的来源是 GetProp
/
使用SetProp
API。那些存储原始指针,因为他们没有在路上需要编组。
I'm still trying to figure out the answer to this question. I would appreciate a nudge in the right direction (since I have very little experience in OLE). Did anyone encounter a similar error after calling RevokDragDrop?
thanks,
You passed marshaled interface into a different apartment. An attempt to call a method revealed this and the call aborted with this error RPC_E_WRONG_THREAD
.
You should be careful using interface pointers on multiple threads. If you intend to use a pointer that you already hold from a different thread, you have to think it over whether you are allowed to or you need explicitly marshal/unmarshal the pointer for such use, e.g. with CoMarshalInterThreadInterfaceInStream
function.
I suppose that the source of the problem is GetProp
/SetProp
API used. Those store raw pointers as they are without marshaling necessary on the way.
这篇关于什么是“OLE应用程序称为为不同线程编组的接口”后调用RevokeDragDrop的意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!