Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / SafeTokenHandle.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PaintEvent.cs
- DeploymentExceptionMapper.cs
- InstanceDataCollectionCollection.cs
- DataGridParentRows.cs
- CodeBlockBuilder.cs
- ToolStripComboBox.cs
- ListenDesigner.cs
- PageContent.cs
- CustomGrammar.cs
- TableLayoutPanelCellPosition.cs
- FrameSecurityDescriptor.cs
- OuterGlowBitmapEffect.cs
- ReferentialConstraint.cs
- JoinCqlBlock.cs
- SqlVersion.cs
- CopyAction.cs
- EntitySqlQueryCacheKey.cs
- ObjectAnimationUsingKeyFrames.cs
- FirstMatchCodeGroup.cs
- SqlClientWrapperSmiStream.cs
- GPRECTF.cs
- TabControl.cs
- PackageDigitalSignature.cs
- DataServiceQueryProvider.cs
- TransactionFlowOption.cs
- OutputCacheEntry.cs
- SecurityDescriptor.cs
- ContractMapping.cs
- TrackBar.cs
- IgnoreSectionHandler.cs
- Baml2006SchemaContext.cs
- PageContentCollection.cs
- SqlAggregateChecker.cs
- WinFormsSecurity.cs
- lengthconverter.cs
- KeyedCollection.cs
- NamespaceDisplayAutomationPeer.cs
- WindowsAuthenticationEventArgs.cs
- CheckBoxBaseAdapter.cs
- SkipQueryOptionExpression.cs
- CodeFieldReferenceExpression.cs
- UpdatePanelTrigger.cs
- DragSelectionMessageFilter.cs
- DetailsViewUpdateEventArgs.cs
- Application.cs
- WindowsGraphics.cs
- TableDetailsRow.cs
- GiveFeedbackEvent.cs
- StreamGeometryContext.cs
- TextBoxRenderer.cs
- EventDescriptorCollection.cs
- SplayTreeNode.cs
- NameSpaceExtractor.cs
- CompilerState.cs
- TransformationRules.cs
- DbException.cs
- TraceContextEventArgs.cs
- TableDesigner.cs
- BinaryFormatterWriter.cs
- DragCompletedEventArgs.cs
- SQLInt32.cs
- SqlCommandSet.cs
- OrderedDictionary.cs
- SystemDiagnosticsSection.cs
- SubstitutionList.cs
- DiscoveryClientChannelFactory.cs
- FixedSOMGroup.cs
- InputLanguageProfileNotifySink.cs
- Serializer.cs
- XPathNodeHelper.cs
- CodeAttributeArgument.cs
- Compilation.cs
- IDataContractSurrogate.cs
- AutomationEvent.cs
- SectionInformation.cs
- ObjectPropertyMapping.cs
- TableColumn.cs
- HuffmanTree.cs
- MailAddressCollection.cs
- DataBinder.cs
- ServiceBuildProvider.cs
- IndexingContentUnit.cs
- IPHostEntry.cs
- PropertyManager.cs
- NegatedConstant.cs
- ErrorTableItemStyle.cs
- DesignOnlyAttribute.cs
- FileLoadException.cs
- ErrorLog.cs
- DockingAttribute.cs
- EventProviderWriter.cs
- SafeEventLogWriteHandle.cs
- streamingZipPartStream.cs
- Decimal.cs
- ProgramPublisher.cs
- MachineKeySection.cs
- TimeZone.cs
- CompilerLocalReference.cs
- EventLevel.cs
- StorageAssociationTypeMapping.cs