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
- ObjectConverter.cs
- DataObject.cs
- Line.cs
- RouteParametersHelper.cs
- ImpersonateTokenRef.cs
- ToolboxComponentsCreatingEventArgs.cs
- SQLMembershipProvider.cs
- RepeaterItemCollection.cs
- TextWriter.cs
- SoapAttributes.cs
- BasicViewGenerator.cs
- ResourceContainer.cs
- FixedLineResult.cs
- OutputCacheModule.cs
- SystemInformation.cs
- DbConnectionPoolGroupProviderInfo.cs
- HtmlString.cs
- TypeElementCollection.cs
- SmtpDigestAuthenticationModule.cs
- CodeAttributeArgument.cs
- ResumeStoryboard.cs
- XmlDictionaryReader.cs
- CharEnumerator.cs
- Base64Stream.cs
- WorkflowTransactionService.cs
- HotSpot.cs
- RectIndependentAnimationStorage.cs
- AttributeQuery.cs
- FormsAuthenticationConfiguration.cs
- UnsafeNativeMethodsPenimc.cs
- BooleanToVisibilityConverter.cs
- XmlSchemaAnnotated.cs
- ActivityCodeDomReferenceService.cs
- SingleResultAttribute.cs
- DesignerUtility.cs
- Literal.cs
- AttachedAnnotation.cs
- InteropAutomationProvider.cs
- ObjectListItemCollection.cs
- GeneralTransform.cs
- SubMenuStyleCollection.cs
- HwndStylusInputProvider.cs
- DataControlPagerLinkButton.cs
- WbmpConverter.cs
- PingOptions.cs
- BitmapMetadataBlob.cs
- ContextMenuStrip.cs
- FixedBufferAttribute.cs
- ExternalFile.cs
- DataGridViewCellPaintingEventArgs.cs
- DataGridViewCellCollection.cs
- UncommonField.cs
- OutputCacheSettings.cs
- StreamInfo.cs
- RadialGradientBrush.cs
- JsonFormatWriterGenerator.cs
- DatasetMethodGenerator.cs
- CommandConverter.cs
- SqlDependencyUtils.cs
- AlternateView.cs
- _HeaderInfoTable.cs
- XmlBaseWriter.cs
- OperationContextScope.cs
- UnsafeNativeMethods.cs
- HttpPostServerProtocol.cs
- BasicViewGenerator.cs
- BoundColumn.cs
- EdmFunctions.cs
- XmlHierarchicalDataSourceView.cs
- ShimAsPublicXamlType.cs
- ExtendedPropertyDescriptor.cs
- WebPartAuthorizationEventArgs.cs
- SecUtil.cs
- RenderOptions.cs
- ServiceEndpointElementCollection.cs
- _NetRes.cs
- __Error.cs
- RelationshipEntry.cs
- WindowsRichEditRange.cs
- PermissionToken.cs
- HostedNamedPipeTransportManager.cs
- DoubleAverageAggregationOperator.cs
- PhysicalFontFamily.cs
- util.cs
- ContextBase.cs
- SystemGatewayIPAddressInformation.cs
- CompilationSection.cs
- RelationshipEntry.cs
- XmlSchemaImporter.cs
- Thread.cs
- ExpressionBuilderContext.cs
- IOException.cs
- ProvidePropertyAttribute.cs
- ManagedWndProcTracker.cs
- cryptoapiTransform.cs
- ImpersonateTokenRef.cs
- DisposableCollectionWrapper.cs
- SecurityState.cs
- Int16KeyFrameCollection.cs
- EnumBuilder.cs