Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / Microsoft / Win32 / SafeCryptContextHandle.cs / 1305376 / SafeCryptContextHandle.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace Microsoft.Win32 { using System; using System.Security.Permissions; using Microsoft.Win32.SafeHandles; using System.Configuration; // Safehandle for crypt context handles [System.Security.SuppressUnmanagedCodeSecurityAttribute()] internal sealed class SafeCryptContextHandle : SafeHandleZeroOrMinusOneIsInvalid { [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] internal SafeCryptContextHandle() : base(true) { } [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] internal SafeCryptContextHandle(IntPtr handle, bool ownsHandle) : base(ownsHandle) { SetHandle(handle); } override protected bool ReleaseHandle() { if (handle != IntPtr.Zero) { UnsafeNativeMethods.CryptReleaseContext(this, 0); return true; } return false; } } } // 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
- SimplePropertyEntry.cs
- ClosureBinding.cs
- latinshape.cs
- DataObject.cs
- _LazyAsyncResult.cs
- EntityProviderServices.cs
- ProofTokenCryptoHandle.cs
- AuthorizationRule.cs
- ShaperBuffers.cs
- RandomNumberGenerator.cs
- SimpleApplicationHost.cs
- RadioButton.cs
- CounterSample.cs
- DesignerDataConnection.cs
- OleServicesContext.cs
- ValidationPropertyAttribute.cs
- Compress.cs
- CheckBoxStandardAdapter.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- SEHException.cs
- WorkflowServiceBehavior.cs
- KeyMatchBuilder.cs
- TreeNodeBinding.cs
- LogEntrySerializationException.cs
- XsdCachingReader.cs
- SecurityKeyType.cs
- BrushValueSerializer.cs
- DelegateHelpers.Generated.cs
- UnionCodeGroup.cs
- WorkflowMarkupSerializationException.cs
- HttpInputStream.cs
- KeyEvent.cs
- MaskInputRejectedEventArgs.cs
- WhitespaceRule.cs
- DataGridColumnsPage.cs
- DocumentSequenceHighlightLayer.cs
- InheritanceRules.cs
- XhtmlConformanceSection.cs
- KeyGestureValueSerializer.cs
- SQLDecimalStorage.cs
- UpdateCommand.cs
- SerializationException.cs
- XPathDocumentNavigator.cs
- PrivilegedConfigurationManager.cs
- XmlAutoDetectWriter.cs
- ConnectionsZoneDesigner.cs
- HtmlDocument.cs
- SqlBuilder.cs
- UnmanagedMemoryStreamWrapper.cs
- SuppressMergeCheckAttribute.cs
- DateTimeFormatInfoScanner.cs
- XmlBoundElement.cs
- MimeMapping.cs
- CreatingCookieEventArgs.cs
- WorkflowPersistenceService.cs
- ResourcePool.cs
- DataServiceRequest.cs
- ListBox.cs
- WebRequestModulesSection.cs
- MeasurementDCInfo.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- Pair.cs
- WFItemsToSpacerVisibility.cs
- TeredoHelper.cs
- ClientConfigPaths.cs
- EndpointAddressProcessor.cs
- IndependentlyAnimatedPropertyMetadata.cs
- CodeSnippetCompileUnit.cs
- FormViewRow.cs
- GlyphInfoList.cs
- FontFamilyConverter.cs
- WindowsServiceElement.cs
- MultilineStringConverter.cs
- VisualStates.cs
- SoapDocumentServiceAttribute.cs
- XsltArgumentList.cs
- CollectionBase.cs
- InvokeMethod.cs
- DataGridToolTip.cs
- TransportConfigurationTypeElementCollection.cs
- StorageModelBuildProvider.cs
- PointAnimationUsingPath.cs
- FileDocument.cs
- ContextInformation.cs
- TiffBitmapDecoder.cs
- Switch.cs
- BinaryQueryOperator.cs
- NetworkCredential.cs
- UInt32Storage.cs
- SurrogateEncoder.cs
- XamlStream.cs
- ExecutionContext.cs
- PenThreadWorker.cs
- BinaryReader.cs
- FullTextBreakpoint.cs
- RawAppCommandInputReport.cs
- CheckBox.cs
- Win32SafeHandles.cs
- Send.cs
- MobileControlDesigner.cs