Hi all,
I have a problem where I think the MS StructuredStorage implementation is showing a really weird behaviour. I had this code working at some point, but I can't seem to find what's broken it...
I open a StructuredStorage, open some streams and write some stuff, then I want to temporarily close the file to rename the folder that contains the file. I do that by Release()ing all the IStorage pointers i have and looking at the memory that it points to I see that it is being overwritten (my debug heap does that when memory is freed).
Still the directory could not be renamed, so I looked in Process Explorer to see if the handle was closed and here is the beginning of the things I don't understand. Before I release the IStorage my process has a HANDLE to the file, but when the IStorage is deleted, the file still shows up if I search for handles, but now it is marked as a DLL! What does that mean? Is it mapped into the memory of my process in some way?
The next weird thing is that after I try to rename the folder (even though I failed) I try to re-open the file, which works fine although I always open the files with STGM_SHARE_EXCLUSIVE. Normally if I fail to release a file completely I cannot open it up again later but this works and looking in Process Explorer again a new handle has been opened, but the DLL is still there?
So I guess my first question is: What does it mean that it shows up as a DLL in process explorer? Maybe I can work my way from there...