Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / IO / Packaging / EncryptedPackageFilter.cs / 1 / EncryptedPackageFilter.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // Implements indexing filter for EncryptedPackageEnvelope. // Invoked by XpsFilter if the file/stream being filtered // is an EncryptedPackageEnvelope. // // History: // 07/18/2005: [....]: Initial implementation //--------------------------------------------------------------------------- using System; using System.Windows; using System.Runtime.InteropServices; using System.IO.Packaging; using MS.Internal.Interop; namespace MS.Internal.IO.Packaging { #region EncryptedPackageFilter ////// Implements IFilter methods to support indexing on EncryptedPackageEnvelope. /// internal class EncryptedPackageFilter : IFilter { #region Constructor ////// Constructor. /// /// EncryptedPackageEnvelope to filter on internal EncryptedPackageFilter(EncryptedPackageEnvelope encryptedPackage) { if (encryptedPackage == null) { throw new ArgumentNullException("encryptedPackage"); } // // Since CorePropertiesFilter is implemented as // a managed filter (supports IManagedFilter interface), // IndexingFilterMarshaler is used to get IFilter interface out of it. // _filter = new IndexingFilterMarshaler( new CorePropertiesFilter( encryptedPackage.PackageProperties )); } #endregion Constructor #region IFilter methods ////// Initialzes the session for this filter. /// /// usage flags /// number of elements in aAttributes array /// array of FULLPROPSPEC structs to restrict responses ///IFILTER_FLAGS_NONE. Return value is effectively ignored by the caller. public IFILTER_FLAGS Init( [In] IFILTER_INIT grfFlags, [In] uint cAttributes, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] FULLPROPSPEC[] aAttributes) { return _filter.Init(grfFlags, cAttributes, aAttributes); } ////// Returns description of the next chunk. /// ///Chunk descriptor public STAT_CHUNK GetChunk() { return _filter.GetChunk(); } ////// Gets text content corresponding to current chunk. /// /// /// ///Not supported in indexing of core properties. public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) { throw new COMException(SR.Get(SRID.FilterGetTextNotSupported), (int)FilterErrorCode.FILTER_E_NO_TEXT); } ////// Gets the property value corresponding to current chunk. /// ///property value public IntPtr GetValue() { return _filter.GetValue(); } ////// Retrieves an interface representing the specified portion of the object. /// /// /// ///Not implemented. Reserved for future use. public IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid) { throw new NotImplementedException(SR.Get(SRID.FilterBindRegionNotImplemented)); } #endregion IFilter methods #region Fields ////// Only filtering that is supported on EncryptedPackageEnvelope /// is of core properties. This points to EncryptedPackageCorePropertiesFilter /// wrapped by FilterMarshaler. /// private IFilter _filter = null; #endregion Fields } #endregion EncryptedPackageFilter } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OpacityConverter.cs
- CalendarKeyboardHelper.cs
- ClientTargetCollection.cs
- DateTimeParse.cs
- LZCodec.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- DbConnectionClosed.cs
- HttpServerVarsCollection.cs
- RemotingServices.cs
- HwndSourceKeyboardInputSite.cs
- WaitHandleCannotBeOpenedException.cs
- PartDesigner.cs
- DbMetaDataColumnNames.cs
- StringPropertyBuilder.cs
- Signature.cs
- OleDbCommandBuilder.cs
- TripleDES.cs
- PaperSize.cs
- XPathNavigator.cs
- ProfileSettingsCollection.cs
- TypedDataSetSchemaImporterExtension.cs
- MaterialGroup.cs
- ThreadStaticAttribute.cs
- QilXmlReader.cs
- MenuItemBindingCollection.cs
- StorageInfo.cs
- HashHelper.cs
- Point3DKeyFrameCollection.cs
- ICollection.cs
- NavigationProperty.cs
- DesignerCategoryAttribute.cs
- XmlWellformedWriterHelpers.cs
- XsdDateTime.cs
- Localizer.cs
- UIElementParaClient.cs
- X509CertificateInitiatorClientCredential.cs
- ToolStripRendererSwitcher.cs
- SourceFileInfo.cs
- documentsequencetextpointer.cs
- MessageDecoder.cs
- CursorConverter.cs
- XamlFigureLengthSerializer.cs
- XmlWriterTraceListener.cs
- xmlformatgeneratorstatics.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- HwndStylusInputProvider.cs
- RunInstallerAttribute.cs
- XmlException.cs
- CodeParameterDeclarationExpressionCollection.cs
- EqualityComparer.cs
- TimeManager.cs
- sapiproxy.cs
- Base64Decoder.cs
- PassportIdentity.cs
- SynchronizedDispatch.cs
- StreamInfo.cs
- RequestCacheManager.cs
- ClientRuntimeConfig.cs
- InvalidCastException.cs
- MediaEntryAttribute.cs
- Identity.cs
- WebPartTracker.cs
- Currency.cs
- NativeObjectSecurity.cs
- ResXDataNode.cs
- TypeUsageBuilder.cs
- NamespaceInfo.cs
- XmlArrayItemAttributes.cs
- GreenMethods.cs
- DocumentViewerHelper.cs
- ITreeGenerator.cs
- BitmapCodecInfoInternal.cs
- GroupAggregateExpr.cs
- OrthographicCamera.cs
- GlyphInfoList.cs
- ModelTypeConverter.cs
- OdbcErrorCollection.cs
- returneventsaver.cs
- MultilineStringConverter.cs
- StaticTextPointer.cs
- FixUp.cs
- FlowLayoutSettings.cs
- ControlCachePolicy.cs
- Soap12FormatExtensions.cs
- OpacityConverter.cs
- ListBindableAttribute.cs
- OleDbReferenceCollection.cs
- SystemDiagnosticsSection.cs
- MessageSecurityOverHttpElement.cs
- DataGridViewMethods.cs
- GenerateHelper.cs
- ValueChangedEventManager.cs
- StylusPointProperties.cs
- _CacheStreams.cs
- Update.cs
- ButtonChrome.cs
- ObjectResult.cs
- BamlBinaryReader.cs
- Relationship.cs
- Stylesheet.cs