I have written an application that implements the CFSTR_FILEGROUPDESCRIPTORW
and CFSTR_FILECONTENTS data formats for transfer from my C# application to
Windows Explorer. I implemented delayed rendering by deriving a new
DataObjectEx class from DataObject and capturing GetData calls for the
"FileGroupDescriptorW" and "FileContents" formats. However, the one thing I
am not able to figure out is if it is possible to access to the associated
FORMATETC structure for the "FileContents" request so that I can read the
lindex value. I have no problem doing interop if that is required. For the
time being, I have implemented a workaround that uses a local variable that
increments itself on each received call for "FileContents". With my brief
testing, I find that Windows Explorer requests the individual file contents
in the order they appear in the file group descriptor. So far there have not
been any out of order requests that would break my hack. Still I would like
to do it right and get the lindex value.
So back to my original question, is there any way to get a peek at the
internal FORMATETC structure that is being used in conjunction to the call to
my GetData method?
|