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
- SafePEFileHandle.cs
- HtmlEncodedRawTextWriter.cs
- Token.cs
- Timer.cs
- NamespaceEmitter.cs
- OleDbRowUpdatingEvent.cs
- SessionSwitchEventArgs.cs
- TdsEnums.cs
- PageScaling.cs
- Visual3D.cs
- PaperSize.cs
- SecurityProtocol.cs
- RegexCompilationInfo.cs
- Socket.cs
- XmlSchemaResource.cs
- Form.cs
- DbParameterCollectionHelper.cs
- FixedSOMElement.cs
- HtmlAnchor.cs
- HtmlElement.cs
- UDPClient.cs
- SqlUtil.cs
- DataServiceBehavior.cs
- DataGridViewEditingControlShowingEventArgs.cs
- MultiAsyncResult.cs
- PenLineJoinValidation.cs
- BitmapEffectDrawingContent.cs
- TableParaClient.cs
- Size.cs
- IUnknownConstantAttribute.cs
- FilteredDataSetHelper.cs
- TreeBuilderBamlTranslator.cs
- RootBuilder.cs
- TcpTransportSecurity.cs
- sortedlist.cs
- TraceUtility.cs
- DesignerWidgets.cs
- LambdaValue.cs
- ToolStripDropDown.cs
- SrgsNameValueTag.cs
- CompilerCollection.cs
- ReleaseInstanceMode.cs
- MULTI_QI.cs
- SqlDuplicator.cs
- NotifyCollectionChangedEventArgs.cs
- VectorKeyFrameCollection.cs
- WindowsRichEdit.cs
- LinkLabelLinkClickedEvent.cs
- MetabaseSettings.cs
- ObjectSecurity.cs
- PropertyCondition.cs
- EmptyStringExpandableObjectConverter.cs
- CompilerErrorCollection.cs
- XPathCompileException.cs
- Underline.cs
- ProfileManager.cs
- AssertSection.cs
- Thread.cs
- PenLineJoinValidation.cs
- Win32Native.cs
- BufferedResponseStream.cs
- IndicShape.cs
- SqlHelper.cs
- EventMap.cs
- mediaeventshelper.cs
- SystemInfo.cs
- DataServiceProcessingPipelineEventArgs.cs
- sitestring.cs
- OrderedDictionary.cs
- ToolStripContentPanel.cs
- Configuration.cs
- WindowsToolbar.cs
- CodeTypeDeclarationCollection.cs
- CachedTypeface.cs
- MetaModel.cs
- DbMetaDataFactory.cs
- RegexMatchCollection.cs
- WindowsScrollBarBits.cs
- PolyBezierSegment.cs
- LinqDataSourceStatusEventArgs.cs
- CommonObjectSecurity.cs
- XmlResolver.cs
- BitmapEffectGeneralTransform.cs
- BamlLocalizer.cs
- UIElementParaClient.cs
- WindowsTokenRoleProvider.cs
- SchemaSetCompiler.cs
- RegexMatch.cs
- TextSpan.cs
- FixedHighlight.cs
- CommonDialog.cs
- NavigationFailedEventArgs.cs
- IResourceProvider.cs
- RequestCachePolicy.cs
- WindowsTab.cs
- WindowsFormsLinkLabel.cs
- XmlNavigatorFilter.cs
- X509ChainPolicy.cs
- XmlDownloadManager.cs
- PropertyPath.cs