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
- diagnosticsswitches.cs
- CLSCompliantAttribute.cs
- LocatorManager.cs
- UIElementIsland.cs
- GeometryDrawing.cs
- DataRowCollection.cs
- FixedSOMGroup.cs
- TableLayoutStyleCollection.cs
- CurrentChangingEventManager.cs
- SystemDiagnosticsSection.cs
- ComplexTypeEmitter.cs
- BooleanToVisibilityConverter.cs
- Bind.cs
- DiscoveryMessageSequence11.cs
- XmlSchemaComplexContentExtension.cs
- WebServiceReceiveDesigner.cs
- SchemaImporterExtensionElement.cs
- PackageFilter.cs
- SByte.cs
- SqlFlattener.cs
- SamlSecurityTokenAuthenticator.cs
- StrokeIntersection.cs
- FontStyles.cs
- MessageQueueInstaller.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- WorkflowFileItem.cs
- SimpleMailWebEventProvider.cs
- Transform3DGroup.cs
- TextSelection.cs
- ColumnClickEvent.cs
- LinearGradientBrush.cs
- KeyProperty.cs
- Authorization.cs
- IgnoreFileBuildProvider.cs
- Point3D.cs
- CredentialCache.cs
- SqlDeflator.cs
- ContractCodeDomInfo.cs
- MenuDesigner.cs
- UnauthorizedWebPart.cs
- SystemTcpConnection.cs
- SizeChangedInfo.cs
- RecommendedAsConfigurableAttribute.cs
- DependencyPropertyValueSerializer.cs
- SmiEventStream.cs
- InputGestureCollection.cs
- Package.cs
- SoapSchemaExporter.cs
- ObjectParameterCollection.cs
- FactoryGenerator.cs
- XmlWrappingReader.cs
- SelectedGridItemChangedEvent.cs
- Component.cs
- ContentType.cs
- ResourcesBuildProvider.cs
- DetailsViewRow.cs
- AuthenticationService.cs
- RC2CryptoServiceProvider.cs
- ObjectSelectorEditor.cs
- HyperLink.cs
- InternalConfigConfigurationFactory.cs
- FillErrorEventArgs.cs
- SQLDoubleStorage.cs
- XamlTemplateSerializer.cs
- DataGridViewComboBoxEditingControl.cs
- ComplexObject.cs
- FrameworkElementFactoryMarkupObject.cs
- OdbcConnectionPoolProviderInfo.cs
- EnlistmentTraceIdentifier.cs
- IncomingWebResponseContext.cs
- WebPartConnectionsConnectVerb.cs
- MetadataHelper.cs
- DataObjectMethodAttribute.cs
- ManualResetEvent.cs
- PageParserFilter.cs
- QueryCacheEntry.cs
- CodeTypeMemberCollection.cs
- XmlHierarchyData.cs
- DispatcherOperation.cs
- Int32Collection.cs
- SqlServer2KCompatibilityCheck.cs
- DotAtomReader.cs
- SafeCryptoHandles.cs
- ColorKeyFrameCollection.cs
- DetailsViewInsertEventArgs.cs
- PenThreadPool.cs
- ClientTarget.cs
- IIS7WorkerRequest.cs
- Transactions.cs
- IndexOutOfRangeException.cs
- CounterSample.cs
- DataPagerFieldItem.cs
- FunctionUpdateCommand.cs
- MenuScrollingVisibilityConverter.cs
- TimeSpanStorage.cs
- SqlMetaData.cs
- FragmentQuery.cs
- RecordsAffectedEventArgs.cs
- ReadOnlyDataSource.cs
- ReferenceEqualityComparer.cs