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
- DecryptRequest.cs
- ReflectPropertyDescriptor.cs
- BackEase.cs
- DependencyObject.cs
- DeploymentSection.cs
- UpdateInfo.cs
- CryptoApi.cs
- ThousandthOfEmRealPoints.cs
- RouteUrlExpressionBuilder.cs
- ReadOnlyHierarchicalDataSource.cs
- SessionEndingCancelEventArgs.cs
- HwndSource.cs
- Stream.cs
- XmlDocumentFragment.cs
- X509ChainPolicy.cs
- SoapHttpTransportImporter.cs
- RemotingAttributes.cs
- RemotingConfigParser.cs
- DataSetSchema.cs
- AtomicFile.cs
- JpegBitmapDecoder.cs
- FigureParaClient.cs
- ImageBrush.cs
- QilSortKey.cs
- CurrentChangedEventManager.cs
- TextParagraphProperties.cs
- TypeTypeConverter.cs
- NodeFunctions.cs
- _NTAuthentication.cs
- SocketElement.cs
- SafeNativeMethods.cs
- RegistryPermission.cs
- DetailsView.cs
- PenThread.cs
- HtmlObjectListAdapter.cs
- MimeParameters.cs
- ResourceDisplayNameAttribute.cs
- TableDetailsCollection.cs
- PersonalizationProvider.cs
- MimeBasePart.cs
- AnimatedTypeHelpers.cs
- CriticalExceptions.cs
- ReferenceEqualityComparer.cs
- CryptoApi.cs
- TargetParameterCountException.cs
- DataPager.cs
- LocatorManager.cs
- TextureBrush.cs
- WorkflowPrinting.cs
- MessageLoggingElement.cs
- PerformanceCounter.cs
- Translator.cs
- SymbolEqualComparer.cs
- HtmlInputImage.cs
- UrlMappingsSection.cs
- ErrorTableItemStyle.cs
- StrokeCollection2.cs
- OutputCacheSettings.cs
- ComponentConverter.cs
- TextServicesContext.cs
- ParserHooks.cs
- ConfigurationPropertyCollection.cs
- Part.cs
- _LocalDataStoreMgr.cs
- DataGridViewComboBoxEditingControl.cs
- PrintPreviewControl.cs
- TextTreeTextElementNode.cs
- TextEditorSpelling.cs
- CatalogPartChrome.cs
- _HelperAsyncResults.cs
- SqlDataSourceStatusEventArgs.cs
- Queue.cs
- FrameSecurityDescriptor.cs
- PathFigure.cs
- BaseParagraph.cs
- CodeTypeDeclarationCollection.cs
- MetadataPropertyvalue.cs
- UnicodeEncoding.cs
- ErrorActivity.cs
- Pool.cs
- DockPanel.cs
- AncillaryOps.cs
- StrongNameKeyPair.cs
- ModelPerspective.cs
- Image.cs
- COM2AboutBoxPropertyDescriptor.cs
- CaseInsensitiveHashCodeProvider.cs
- DataControlExtensions.cs
- RestClientProxyHandler.cs
- AsyncCompletedEventArgs.cs
- ManagementOperationWatcher.cs
- WaitHandleCannotBeOpenedException.cs
- ObjectListItemCollection.cs
- ObjectItemCollection.cs
- InvokeMethodActivityDesigner.cs
- WeakHashtable.cs
- WSFederationHttpBindingCollectionElement.cs
- MeasureItemEvent.cs
- ReadOnlyDataSourceView.cs
- AlternateViewCollection.cs