Пример #1
0
            int IPropertySetStorage.Open(
                ref Guid rfmtid,
                UInt32 grfMode,
                out IPropertyStorage ppprstg
                )
            {
                UnsafeNativeCompoundFileMethods.UnsafeNativeIPropertyStorage propertyStorage;

                int hr = _unsafePropertySetStorage.Open(
                    ref rfmtid,
                    grfMode,
                    out propertyStorage
                    );

                if (propertyStorage != null)
                {
                    ppprstg = new SafeIPropertyStorageImplementation(propertyStorage);
                }
                else
                {
                    ppprstg = null;
                }

                return(hr);
            }
Пример #2
0
            void IPropertySetStorage.Create(
                ref Guid rfmtid,
                ref Guid pclsid,
                UInt32 grfFlags,
                UInt32 grfMode,
                out IPropertyStorage ppprstg
                )
            {
                UnsafeNativeCompoundFileMethods.UnsafeNativeIPropertyStorage propertyStorage;

                _unsafePropertySetStorage.Create(
                    ref rfmtid,
                    ref pclsid,
                    grfFlags,
                    grfMode,
                    out propertyStorage
                    );

                if (propertyStorage != null)
                {
                    ppprstg = new SafeIPropertyStorageImplementation(propertyStorage);
                }
                else
                {
                    ppprstg = null;
                }
            }
Пример #3
0
            int IPropertySetStorage.Open(
                    ref Guid rfmtid,
                    UInt32 grfMode,
                    out IPropertyStorage ppprstg
                    )
            {
                SecurityHelper.DemandCompoundFileIOPermission();
                
                UnsafeNativeCompoundFileMethods.UnsafeNativeIPropertyStorage propertyStorage;

                int hr = _unsafePropertySetStorage.Open(
                    ref rfmtid,
                    grfMode,
                    out propertyStorage
                    );

                if (propertyStorage != null)
                    ppprstg = new SafeIPropertyStorageImplementation(propertyStorage);
                else
                    ppprstg = null;

                return hr;
            }
Пример #4
0
            void IPropertySetStorage.Create(
                    ref Guid rfmtid,
                    ref Guid pclsid,
                    UInt32 grfFlags,
                    UInt32 grfMode,
                    out IPropertyStorage ppprstg
                    )
            {
                SecurityHelper.DemandCompoundFileIOPermission();

                UnsafeNativeCompoundFileMethods.UnsafeNativeIPropertyStorage propertyStorage;

                _unsafePropertySetStorage.Create(
                    ref rfmtid,
                    ref pclsid,
                    grfFlags,
                    grfMode,
                    out propertyStorage
                    );

                if (propertyStorage != null)
                    ppprstg = new SafeIPropertyStorageImplementation(propertyStorage);
                else
                    ppprstg = null;
            }