Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / CloseCryptoHandleRequest.cs / 1 / CloseCryptoHandleRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.Diagnostics; using System.Threading; //ManualResetEvent using System.ComponentModel; //Win32Exception using System.IO; //Stream using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; using System.Security.Principal; // // Summary: // Handles a request to close a CryptoSession. // class CloseCryptoHandleRequest : ClientRequest { // // The cryptosession id we are attaching to. // int m_cryptoSession; // // Sumamry: // Construct an CloseCryptoHandleRequest object // // Arguments: // callingProcess - The process in which the caller originated. // callingIdentity - The WindowsIdentity of the caller // rpcHandle - The handle of the native RPC request // inArgs - The stream to read input data from // outArgs - The stream to write output data to // public CloseCryptoHandleRequest( Process callingProcess, WindowsIdentity callingIdentity, IntPtr rpcHandle, Stream inArgs, Stream outArgs ) : base( callingProcess, callingIdentity, rpcHandle, inArgs, outArgs ) { IDT.TraceDebug( "Intiating an CloseCryptoHandleRequest request" ); } protected override void OnMarshalInArgs() { IDT.DebugAssert( null != InArgs, "null inargs" ); BinaryReader reader = new InfoCardBinaryReader( InArgs ); m_cryptoSession = reader.ReadInt32(); IDT.ThrowInvalidArgumentConditional( 0 == m_cryptoSession, "cryptoSession" ); } protected override void OnMarshalOutArgs() { } // // Summary // Closes a cryptoSession. // protected override void OnProcess() { CryptoSession session = CryptoSession.Find( m_cryptoSession, CallerPid, RequestorIdentity.User ); session.Dispose(); } } } // 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
- SQLInt64.cs
- WSSecurityPolicy12.cs
- PermissionSetEnumerator.cs
- ValueUnavailableException.cs
- DesignerExtenders.cs
- HandlerBase.cs
- TreeViewDesigner.cs
- ParameterBuilder.cs
- SoapIgnoreAttribute.cs
- ButtonBaseAutomationPeer.cs
- AssemblyHash.cs
- NameSpaceEvent.cs
- PageThemeParser.cs
- BitmapCodecInfoInternal.cs
- ConfigPathUtility.cs
- ColorMap.cs
- StylusShape.cs
- PermissionSetEnumerator.cs
- DiscoveryUtility.cs
- StateChangeEvent.cs
- SourceCollection.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- CodeArgumentReferenceExpression.cs
- MemberCollection.cs
- XmlCharacterData.cs
- ByteAnimationUsingKeyFrames.cs
- MetaChildrenColumn.cs
- ContextMenuAutomationPeer.cs
- Compiler.cs
- DataViewManagerListItemTypeDescriptor.cs
- DateTimeParse.cs
- NumericUpDown.cs
- LocalizationParserHooks.cs
- SupportsPreviewControlAttribute.cs
- DataKey.cs
- ButtonFlatAdapter.cs
- Propagator.Evaluator.cs
- SchemaContext.cs
- XPathScanner.cs
- ToolStripPanel.cs
- SelectedDatesCollection.cs
- BinaryQueryOperator.cs
- NamedPipeWorkerProcess.cs
- SecurityContext.cs
- MsmqIntegrationProcessProtocolHandler.cs
- DbDataSourceEnumerator.cs
- SrgsDocumentParser.cs
- MethodToken.cs
- counter.cs
- Matrix3D.cs
- SspiHelper.cs
- DotAtomReader.cs
- ProtocolsConfiguration.cs
- NativeObjectSecurity.cs
- WorkBatch.cs
- FormatConvertedBitmap.cs
- TdsParserStateObject.cs
- ListViewGroup.cs
- TextWriterEngine.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- UriSectionReader.cs
- ConfigurationSettings.cs
- AppDomainFactory.cs
- OracleCommandSet.cs
- InputScopeNameConverter.cs
- TableCellCollection.cs
- AdapterDictionary.cs
- WorkflowClientDeliverMessageWrapper.cs
- BindingExpressionBase.cs
- RangeContentEnumerator.cs
- tooltip.cs
- DoubleLinkList.cs
- MemoryMappedViewStream.cs
- UInt32Storage.cs
- WindowsScrollBar.cs
- NumericPagerField.cs
- SByte.cs
- ZoneLinkButton.cs
- BitmapEffectOutputConnector.cs
- TimelineGroup.cs
- Point3DIndependentAnimationStorage.cs
- TypeElement.cs
- DataTemplateSelector.cs
- TextBox.cs
- ListChunk.cs
- ComplexObject.cs
- CapabilitiesState.cs
- StrokeNodeData.cs
- RayMeshGeometry3DHitTestResult.cs
- DispatchWrapper.cs
- StreamInfo.cs
- HttpCookiesSection.cs
- RegistryDataKey.cs
- GridEntry.cs
- HyperLinkColumn.cs
- CompilationPass2TaskInternal.cs
- PrinterUnitConvert.cs
- XmlSortKeyAccumulator.cs
- SystemMulticastIPAddressInformation.cs
- AssociationSetMetadata.cs