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
- LinkConverter.cs
- XmlStreamStore.cs
- CompilationPass2Task.cs
- SoapWriter.cs
- StylusPointPropertyInfoDefaults.cs
- MediaContextNotificationWindow.cs
- SearchForVirtualItemEventArgs.cs
- ParameterCollection.cs
- ObjectTokenCategory.cs
- IntSecurity.cs
- PropertyChangeTracker.cs
- ToolboxItemFilterAttribute.cs
- activationcontext.cs
- ContextDataSourceContextData.cs
- AppModelKnownContentFactory.cs
- CharStorage.cs
- MemoryMappedViewStream.cs
- ModelItemExtensions.cs
- EntityDataSourceChangingEventArgs.cs
- WindowsTokenRoleProvider.cs
- HttpTransportSecurityElement.cs
- Int16Animation.cs
- DeliveryStrategy.cs
- ComboBox.cs
- DefaultHttpHandler.cs
- ParameterReplacerVisitor.cs
- CodeAccessPermission.cs
- ClientEventManager.cs
- AutoResetEvent.cs
- sqlser.cs
- BitmapEffectRenderDataResource.cs
- StatusBarPanel.cs
- RewritingProcessor.cs
- GraphicsPathIterator.cs
- WindowsAuthenticationModule.cs
- SqlLiftWhereClauses.cs
- SystemIPInterfaceStatistics.cs
- CounterCreationDataCollection.cs
- EntityDataSourceChangedEventArgs.cs
- ObjectListTitleAttribute.cs
- TriggerActionCollection.cs
- FixUpCollection.cs
- RuleEngine.cs
- MessageBox.cs
- LinkClickEvent.cs
- XmlSchemaElement.cs
- Matrix.cs
- ClusterUtils.cs
- Compilation.cs
- XpsSerializerFactory.cs
- ReadOnlyPropertyMetadata.cs
- ActivitySurrogateSelector.cs
- DataSourceSelectArguments.cs
- RoleGroup.cs
- _CacheStreams.cs
- DataControlButton.cs
- ColorTransform.cs
- ObjectSpanRewriter.cs
- OleDbConnectionInternal.cs
- ColorTransformHelper.cs
- XmlElementCollection.cs
- x509store.cs
- EventSetter.cs
- DataSourceGeneratorException.cs
- XmlExceptionHelper.cs
- GridViewColumn.cs
- SystemEvents.cs
- CurrentTimeZone.cs
- CacheMemory.cs
- InternalPermissions.cs
- DataTemplate.cs
- webproxy.cs
- WebPartZoneBase.cs
- ConfigurationStrings.cs
- DateTimeFormat.cs
- SafeNativeMethodsOther.cs
- CommonObjectSecurity.cs
- ConfigXmlAttribute.cs
- HttpException.cs
- X509Chain.cs
- AsymmetricKeyExchangeFormatter.cs
- ValidationSettings.cs
- URL.cs
- Menu.cs
- MessageBox.cs
- QilVisitor.cs
- Keywords.cs
- SspiSafeHandles.cs
- XmlDigitalSignatureProcessor.cs
- IntegrationExceptionEventArgs.cs
- ClassicBorderDecorator.cs
- BamlRecordHelper.cs
- WebPartEditorCancelVerb.cs
- ReadWriteSpinLock.cs
- WebPartDeleteVerb.cs
- ChangeToolStripParentVerb.cs
- EnumerableWrapperWeakToStrong.cs
- StateWorkerRequest.cs
- Directory.cs
- AssertFilter.cs