コード例 #1
0
            int IStorage.OpenStream(
                string pwcsName,
                int reserved1,
                int grfMode,
                int reserved2,
                out IStream ppstm)
            {
                UnsafeNativeCompoundFileMethods.UnsafeNativeIStream stream;
                int result;

                result = _unsafeStorage.OpenStream(
                    pwcsName,
                    reserved1,
                    grfMode,
                    reserved2,
                    out stream);

                if (result == SafeNativeCompoundFileConstants.S_OK)
                {
                    ppstm = new SafeIStreamImplementation(stream);
                }
                else
                {
                    ppstm = null;
                }

                return(result);
            }
コード例 #2
0
ファイル: NativeCompoundFileAPIs.cs プロジェクト: ash2005/z
            //
            // IStorage Implementation
            //

            int IStorage.CreateStream(
                string pwcsName,
                int grfMode,
                int reserved1,
                int reserved2,
                out IStream ppstm)
            {
                SecurityHelper.DemandCompoundFileIOPermission();

                UnsafeNativeCompoundFileMethods.UnsafeNativeIStream stream;
                int result;

                result = _unsafeStorage.CreateStream(
                    pwcsName,
                    grfMode,
                    reserved1,
                    reserved2,
                    out stream);

                if (result == SafeNativeCompoundFileConstants.S_OK)
                {
                    ppstm = new SafeIStreamImplementation(stream);
                }
                else
                {
                    ppstm = null;
                }

                return(result);
            }
コード例 #3
0
            void IStream.Clone(out IStream ppstm)
            {
                UnsafeNativeCompoundFileMethods.UnsafeNativeIStream stream;

                _unsafeStream.Clone(out stream);

                if (stream != null)
                {
                    ppstm = new SafeIStreamImplementation(stream);
                }
                else
                {
                    ppstm = null;
                }
            }
コード例 #4
0
ファイル: NativeCompoundFileAPIs.cs プロジェクト: ash2005/z
            void IStream.Clone(out IStream ppstm)
            {
                SecurityHelper.DemandCompoundFileIOPermission();

                UnsafeNativeCompoundFileMethods.UnsafeNativeIStream stream;

                _unsafeStream.Clone(out stream);

                if (stream != null)
                {
                    ppstm = new SafeIStreamImplementation(stream);
                }
                else
                {
                    ppstm = null;
                }
            }
コード例 #5
0
            void IStream.Clone(out IStream ppstm)
            {
                SecurityHelper.DemandCompoundFileIOPermission();

                UnsafeNativeCompoundFileMethods.UnsafeNativeIStream stream;

                _unsafeStream.Clone(out stream);

                if (stream != null)
                {
                    ppstm = new SafeIStreamImplementation(stream);
                }
                else
                {
                    ppstm = null;
                }
            }
コード例 #6
0
            int IStorage.OpenStream(
                string pwcsName,
                int reserved1,
                int grfMode,
                int reserved2,
                out IStream ppstm )
            {
                SecurityHelper.DemandCompoundFileIOPermission();

                UnsafeNativeCompoundFileMethods.UnsafeNativeIStream stream;
                int result;

                result = _unsafeStorage.OpenStream(
                    pwcsName,
                    reserved1,
                    grfMode,
                    reserved2,
                    out stream);

                if (result == SafeNativeCompoundFileConstants.S_OK)
                {
                    ppstm = new SafeIStreamImplementation(stream);
                }
                else
                {
                    ppstm = null;
                }

                return result;
            }