Beispiel #1
0
        public Stream GetFileStream()
        {
            if (tempStreamReader != null)
                return tempStreamReader;
            else if (providerItem != null)
            {
                if (tempParentStorage == null)
                    ShellHelper.GetIStorage(providerItem.ParentItem, out tempParentStoragePtr, out tempParentStorage);

                tempStreamReader = new ShellStreamReader(providerItem, tempParentStorage, fileAccess);                
                return tempStreamReader;
            }
            else
                throw new Exception("Not possible to open a filestream.");
        }
Beispiel #2
0
        public NativeShellAPI.STATSTG GetFileInfo()
        {
            if (tempStreamReader != null)
                return tempStreamReader.StreamInfo;
            else if (providerItem != null)
            {
                if (tempParentStorage == null)
                    ShellHelper.GetIStorage(providerItem.ParentItem, out tempParentStoragePtr, out tempParentStorage);

                tempStreamReader = new ShellStreamReader(providerItem, tempParentStorage, fileAccess);
                return tempStreamReader.StreamInfo;
            }
            else
                throw new Exception("Not possible to retrieve the STATSTG.");
        }
Beispiel #3
0
        public Stream GetFileStream()
        {
            if (tempStreamReader != null)
            {
                return(tempStreamReader);
            }
            else if (providerItem != null)
            {
                if (tempParentStorage == null)
                {
                    ShellHelper.GetIStorage(providerItem.ParentItem, out tempParentStoragePtr, out tempParentStorage);
                }

                tempStreamReader = new ShellStreamReader(providerItem, tempParentStorage, fileAccess);
                return(tempStreamReader);
            }
            else
            {
                throw new Exception("Not possible to open a filestream.");
            }
        }
Beispiel #4
0
        public NativeShellAPI.STATSTG GetFileInfo()
        {
            if (tempStreamReader != null)
            {
                return(tempStreamReader.StreamInfo);
            }
            else if (providerItem != null)
            {
                if (tempParentStorage == null)
                {
                    ShellHelper.GetIStorage(providerItem.ParentItem, out tempParentStoragePtr, out tempParentStorage);
                }

                tempStreamReader = new ShellStreamReader(providerItem, tempParentStorage, fileAccess);
                return(tempStreamReader.StreamInfo);
            }
            else
            {
                throw new Exception("Not possible to retrieve the STATSTG.");
            }
        }