Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / SafeTokenHandle.cs / 1305376 / SafeTokenHandle.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Selectors { using System; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Security; // // Summary: // Provides a wrapper over the generic xml token returned from the native client // internal class SafeTokenHandle : SafeHandle { [DllImport( "infocardapi.dll", EntryPoint ="FreeToken", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall, ExactSpelling = true, SetLastError = true ) ] [SuppressUnmanagedCodeSecurity] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public static extern System.Int32 FreeToken( [In] IntPtr token ); private SafeTokenHandle() : base( IntPtr.Zero, true ) { } public override bool IsInvalid { get { return ( IntPtr.Zero == base.handle ); } } protected override bool ReleaseHandle() { #pragma warning suppress 56523 return ( 0 == FreeToken( base.handle ) ) ? false : true; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Int64KeyFrameCollection.cs
- LineServicesRun.cs
- XmlIterators.cs
- PoisonMessageException.cs
- NetworkInterface.cs
- BackgroundWorker.cs
- ToolStripRendererSwitcher.cs
- SystemIPInterfaceStatistics.cs
- SourceFileBuildProvider.cs
- XmlResolver.cs
- xdrvalidator.cs
- DoubleLinkListEnumerator.cs
- MobileUserControl.cs
- TabControl.cs
- TrackingExtract.cs
- NativeActivityMetadata.cs
- WebMessageEncodingElement.cs
- WmpBitmapEncoder.cs
- ITextView.cs
- SystemException.cs
- EdmToObjectNamespaceMap.cs
- ExceptionHandlers.cs
- CodeMethodReturnStatement.cs
- Util.cs
- InputManager.cs
- SecurityException.cs
- ProviderConnectionPoint.cs
- UiaCoreApi.cs
- CodeGen.cs
- LineInfo.cs
- InstalledFontCollection.cs
- XPathDocumentBuilder.cs
- RectangleHotSpot.cs
- KeyBinding.cs
- EdmFunction.cs
- TextElement.cs
- EmulateRecognizeCompletedEventArgs.cs
- SoundPlayerAction.cs
- UpdatePanel.cs
- SspiHelper.cs
- ObservableDictionary.cs
- AutomationElementIdentifiers.cs
- CryptoApi.cs
- CompositeScriptReference.cs
- LOSFormatter.cs
- SecurityTokenParameters.cs
- NavigationPropertySingletonExpression.cs
- HttpStreams.cs
- VisualTreeHelper.cs
- TableProvider.cs
- CounterSample.cs
- ExecutionScope.cs
- Soap12ProtocolReflector.cs
- DependencyObjectProvider.cs
- SerializationInfo.cs
- Inflater.cs
- EmptyImpersonationContext.cs
- EventProvider.cs
- TabItem.cs
- SHA384Managed.cs
- FrameworkReadOnlyPropertyMetadata.cs
- AutomationPeer.cs
- GroupBoxDesigner.cs
- MDIClient.cs
- DataContractAttribute.cs
- AnnotationComponentManager.cs
- PerformanceCounterPermissionEntryCollection.cs
- SHA1CryptoServiceProvider.cs
- BitmapData.cs
- XPathDocumentIterator.cs
- SectionInput.cs
- PreProcessInputEventArgs.cs
- LinqToSqlWrapper.cs
- SimpleHandlerFactory.cs
- FixedStringLookup.cs
- ScrollChrome.cs
- ToolStripContainer.cs
- MethodAccessException.cs
- AttachInfo.cs
- VirtualPath.cs
- Permission.cs
- StringReader.cs
- DataGridTablesFactory.cs
- XpsResourceDictionary.cs
- SettingsProperty.cs
- WindowsEditBox.cs
- XamlToRtfParser.cs
- ipaddressinformationcollection.cs
- VectorAnimationUsingKeyFrames.cs
- ToolStripItemCollection.cs
- XamlParser.cs
- ToolboxItem.cs
- DefaultSettingsSection.cs
- WarningException.cs
- ItemsChangedEventArgs.cs
- DataGridItemEventArgs.cs
- RootNamespaceAttribute.cs
- ReadOnlyDataSource.cs
- CrossAppDomainChannel.cs
- ClientConfigurationHost.cs