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
- Parameter.cs
- EditBehavior.cs
- AQNBuilder.cs
- DesignerRegionMouseEventArgs.cs
- OleStrCAMarshaler.cs
- StyleSheetDesigner.cs
- DispatcherHookEventArgs.cs
- GridViewEditEventArgs.cs
- TextBox.cs
- DataGridPageChangedEventArgs.cs
- WebPartEventArgs.cs
- XLinq.cs
- HtmlInputPassword.cs
- JournalEntryListConverter.cs
- ExtendedPropertyInfo.cs
- namescope.cs
- ApplicationServiceManager.cs
- DataDocumentXPathNavigator.cs
- CodeEventReferenceExpression.cs
- WaitHandleCannotBeOpenedException.cs
- MonthChangedEventArgs.cs
- ServiceChannelFactory.cs
- _AcceptOverlappedAsyncResult.cs
- GridViewRowEventArgs.cs
- FrameworkObject.cs
- ThemeableAttribute.cs
- DataGridViewSelectedRowCollection.cs
- HttpHeaderCollection.cs
- WmpBitmapDecoder.cs
- PeerEndPoint.cs
- SqlUtil.cs
- ErrorInfoXmlDocument.cs
- HtmlInputPassword.cs
- Image.cs
- ComponentCollection.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- AttachInfo.cs
- FontDriver.cs
- CodeDomComponentSerializationService.cs
- XmlWrappingReader.cs
- MessageFilterTable.cs
- XmlSchemaRedefine.cs
- CrossAppDomainChannel.cs
- SmuggledIUnknown.cs
- FontFamily.cs
- PathData.cs
- DbConnectionPoolIdentity.cs
- SecurityException.cs
- GridItem.cs
- SoapDocumentServiceAttribute.cs
- AppendHelper.cs
- ApplicationSettingsBase.cs
- WorkflowServiceHostFactory.cs
- EastAsianLunisolarCalendar.cs
- TableParaClient.cs
- RuleSettingsCollection.cs
- TraceEventCache.cs
- basenumberconverter.cs
- SafeNativeMethodsOther.cs
- XPathDocumentIterator.cs
- TextServicesHost.cs
- PartialCachingControl.cs
- CoreSwitches.cs
- RepeaterItemEventArgs.cs
- DependencyObjectPropertyDescriptor.cs
- PenThreadPool.cs
- EllipticalNodeOperations.cs
- DbMetaDataCollectionNames.cs
- EventsTab.cs
- XmlObjectSerializerWriteContext.cs
- MemberMaps.cs
- basecomparevalidator.cs
- ProgressBar.cs
- MdImport.cs
- nulltextnavigator.cs
- RijndaelManagedTransform.cs
- MgmtConfigurationRecord.cs
- WebConfigurationHost.cs
- CodeDefaultValueExpression.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DefaultTypeArgumentAttribute.cs
- InnerItemCollectionView.cs
- parserscommon.cs
- QilGeneratorEnv.cs
- MetadataArtifactLoaderComposite.cs
- WindowsFont.cs
- AppAction.cs
- DataGridBoolColumn.cs
- ExpanderAutomationPeer.cs
- ExtensibleClassFactory.cs
- IFormattable.cs
- IndexerNameAttribute.cs
- OperationFormatUse.cs
- TreeNodeClickEventArgs.cs
- SmtpReplyReader.cs
- ItemsPresenter.cs
- IUnknownConstantAttribute.cs
- Descriptor.cs
- ApplicationTrust.cs
- Context.cs