Hi,
There is a code which uses OLE drag-drop for drag from application to windows explorer. It uses delayed rendering and uses CFSTR_FILEDESCRIPTOR and CFSTR_FILECONTENTS formats. It is pretty much doing the normal stuffs:
i) It creates a Global Memory on LbuttonDown and stores the file/s selected.
ii) It is storing both the formats to be called for rendering.
iii) On calling RenderData, it is calling the over-ridden functions for GetData depending on the format specified.
The problem I am facing are two fold :
i) GetData for CFSTR_FILECONTENTS is not getting called always. the behavior is inconsistent. Anything I am missing that is causing this inconsistency ? Has it got to do by any chance with some kind of marshaling/unmarshaling.
ii) When GetData for CFSTR_FILECONTENTS is called, it gives me back an error "invalid memory location" and then bails out. The progress appears though with the proper file-name until I click ok.
When it is not called, progress bar appears but nothing happens [even file-name of the file to be transferred does not appear]. I will have to restart the explorer to get rid of it.
Has some one encountered any of the above problems or have suggestions for me to try out ?
Also, I have a question. How does the explorer get to know the file-name it is transferring ? I am not able to figure out where in the code file-name is being sent.
The code is too huge to post even the relevant stuffs. Please let me know if any particular is needed. Please Help. I am badly stuck.
Thanks,
Shishir