Asked By Caesar
16-Nov-09 03:39 AM

Hi All,
Basically I am implementing asynchronous copy&paste and Drag&drop operation
for my NSE (file copy operation from NSE to windows explorer). I have
implemented IAsyncoperation for my DataObject. So far, it appears that my
target (windows explorer) can be browsed when file transfer is going on.
However, the problem I face is that the source (NSE) is sluggish. It is as
if my NSE is waiting for file copy to be completed before it can be refreshed.
I suspect that it is because data object and NSE UI thread reside in the
same STA. So in my DataObject, when explorer calls
DataObject::GetData(CFSTR_FILECONTENTS), I will create a worker thread to
instantiate IStream object and then marshall it back to main thread with
CoGetInterfaceAndReleaseStream().
However, it does not work. The transfer dialog appears and just stop there
and my IStream::Read() does not appear to be called. I am stuck for almost a
month now with this problem.
Any help is appreaciated. Thank you.