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
- WpfSharedBamlSchemaContext.cs
- ReadWriteObjectLock.cs
- TrailingSpaceComparer.cs
- LineServices.cs
- LocalFileSettingsProvider.cs
- UdpSocketReceiveManager.cs
- StatusBarPanelClickEvent.cs
- TCPListener.cs
- OdbcCommandBuilder.cs
- Matrix.cs
- TreeNodeMouseHoverEvent.cs
- DesignerContextDescriptor.cs
- MaskPropertyEditor.cs
- EnumerableRowCollection.cs
- TextModifier.cs
- Sql8ConformanceChecker.cs
- XmlExpressionDumper.cs
- ProviderMetadataCachedInformation.cs
- DesignSurface.cs
- TextTreeTextElementNode.cs
- CodeIdentifier.cs
- OraclePermission.cs
- CorrelationActionMessageFilter.cs
- ConstraintConverter.cs
- RIPEMD160Managed.cs
- RtfToXamlReader.cs
- UserControl.cs
- DynamicDocumentPaginator.cs
- EmptyReadOnlyDictionaryInternal.cs
- BrowserTree.cs
- CopyAttributesAction.cs
- AttributeProviderAttribute.cs
- _TransmitFileOverlappedAsyncResult.cs
- BeginStoryboard.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- MessageCredentialType.cs
- XmlSchemaElement.cs
- TemplateFactory.cs
- dataprotectionpermissionattribute.cs
- ObjectQuery.cs
- DbConvert.cs
- RequestCache.cs
- XamlBuildTaskServices.cs
- SettingsPropertyWrongTypeException.cs
- ObjectSerializerFactory.cs
- DesignerWithHeader.cs
- SecurityManager.cs
- GenericEnumerator.cs
- ParameterToken.cs
- TableItemStyle.cs
- SQLDoubleStorage.cs
- _ContextAwareResult.cs
- WindowsTreeView.cs
- PlacementWorkspace.cs
- DesignTimeTemplateParser.cs
- TreeIterators.cs
- TreeViewImageKeyConverter.cs
- KeyboardDevice.cs
- SqlError.cs
- FunctionUpdateCommand.cs
- OptimalTextSource.cs
- ImageIndexConverter.cs
- QueryStringParameter.cs
- Thumb.cs
- HotCommands.cs
- SpotLight.cs
- DescendentsWalkerBase.cs
- XmlDataDocument.cs
- UnsafeNativeMethods.cs
- ClientType.cs
- TypeDescriptionProvider.cs
- MeasureItemEvent.cs
- TextRangeEditLists.cs
- RangeValuePattern.cs
- DayRenderEvent.cs
- IISUnsafeMethods.cs
- FixedSOMFixedBlock.cs
- SimpleHandlerFactory.cs
- XamlBrushSerializer.cs
- FrameworkElementAutomationPeer.cs
- EditorPartDesigner.cs
- StateMachineAction.cs
- RequestCacheManager.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- BoundsDrawingContextWalker.cs
- EndpointIdentity.cs
- DataListItem.cs
- OracleBinary.cs
- MappingMetadataHelper.cs
- CompositeCollection.cs
- ValueSerializerAttribute.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ActionFrame.cs
- Popup.cs
- HttpCapabilitiesSectionHandler.cs
- TreeViewAutomationPeer.cs
- MetadataProperty.cs
- FixedNode.cs
- counter.cs
- TimeoutHelper.cs