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
- Authorization.cs
- DynamicValidatorEventArgs.cs
- ToolboxBitmapAttribute.cs
- SmtpMail.cs
- FragmentQuery.cs
- HGlobalSafeHandle.cs
- webeventbuffer.cs
- WebFormDesignerActionService.cs
- JavaScriptSerializer.cs
- CodeDOMProvider.cs
- RequestResponse.cs
- SafeRightsManagementEnvironmentHandle.cs
- KeyboardEventArgs.cs
- XmlIlTypeHelper.cs
- DataViewSettingCollection.cs
- ListSortDescription.cs
- OAVariantLib.cs
- PeerNameRecordCollection.cs
- _SslStream.cs
- GridToolTip.cs
- DataBoundControl.cs
- SqlCacheDependencyDatabaseCollection.cs
- TileModeValidation.cs
- CodeEntryPointMethod.cs
- BrowsableAttribute.cs
- InProcStateClientManager.cs
- StackOverflowException.cs
- serverconfig.cs
- SecurityUtils.cs
- ImagingCache.cs
- InvalidOleVariantTypeException.cs
- XmlSchemaAll.cs
- DaylightTime.cs
- KeyPressEvent.cs
- CatalogPart.cs
- IsolatedStorageFilePermission.cs
- BackgroundFormatInfo.cs
- ReadOnlyDataSource.cs
- OdbcErrorCollection.cs
- EncoderReplacementFallback.cs
- JpegBitmapDecoder.cs
- ContentElementAutomationPeer.cs
- SystemUnicastIPAddressInformation.cs
- X509Utils.cs
- FixedStringLookup.cs
- UidManager.cs
- AssemblyCollection.cs
- Dispatcher.cs
- TextPointerBase.cs
- Sorting.cs
- XPathNode.cs
- FileDialog_Vista.cs
- Viewport3DAutomationPeer.cs
- ContentPlaceHolderDesigner.cs
- MouseGestureConverter.cs
- EntityTypeEmitter.cs
- CreateBookmarkScope.cs
- DatePicker.cs
- PlainXmlSerializer.cs
- TerminateSequenceResponse.cs
- DoubleCollection.cs
- SoapHeaders.cs
- CharEntityEncoderFallback.cs
- XmlIlTypeHelper.cs
- SqlServer2KCompatibilityCheck.cs
- dataSvcMapFileLoader.cs
- ToolStripDropDownButton.cs
- BindingCompleteEventArgs.cs
- PermissionListSet.cs
- ElementProxy.cs
- ListBox.cs
- ClientType.cs
- AccessViolationException.cs
- BufferedGraphicsManager.cs
- SettingsPropertyCollection.cs
- StreamMarshaler.cs
- BitmapSourceSafeMILHandle.cs
- MaskInputRejectedEventArgs.cs
- HttpValueCollection.cs
- IncrementalReadDecoders.cs
- HeaderPanel.cs
- WebPartConnectVerb.cs
- StylusPointProperty.cs
- ProxyOperationRuntime.cs
- SymLanguageVendor.cs
- RuntimeConfig.cs
- GridItemCollection.cs
- SqlConnectionPoolProviderInfo.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- AssemblySettingAttributes.cs
- MiniMapControl.xaml.cs
- URIFormatException.cs
- MSHTMLHost.cs
- InvalidOleVariantTypeException.cs
- NativeMethods.cs
- SchemaManager.cs
- StringComparer.cs
- XmlTextReader.cs
- XPathNavigatorReader.cs
- WindowsListBox.cs