Retrieve full path of file from IStream instance
Posted on 2012-04-02
Hi I am implementing a thumbnail provider for my custom files. So I have implemented 2 interfaces IThumbnailProvider and IInitializeWithStream interface. I have over written the methods Initialize() of IInitializeWithStream and GetThumbnail() of IThumbnailProvider .
Initialize() and GetThumbnail() methods are invoked when user open a directory in Windows Explorer which consists of my custom files.
In Initialize(), I get an instance to IStream object. Over here i am able to retrieve just the file name. is there any way through which i can retrieve Full path of the file.
I have tried using IStream_ReadPidl() but some how it fails. it doesnt return S_OK. It returns 0x8007000D.
I am using Visual Studio 2010. And working on a Windows 7 OS.