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
- CompareInfo.cs
- TraceProvider.cs
- CheckBoxField.cs
- OracleEncoding.cs
- ErrorInfoXmlDocument.cs
- comcontractssection.cs
- LogLogRecordEnumerator.cs
- RegexInterpreter.cs
- BindingBase.cs
- AssociationType.cs
- SslStreamSecurityUpgradeProvider.cs
- NestPullup.cs
- LineServicesRun.cs
- XmlObjectSerializerWriteContextComplex.cs
- EventProviderClassic.cs
- PrivilegeNotHeldException.cs
- RoutedEventConverter.cs
- PerfCounterSection.cs
- HitTestParameters3D.cs
- MemberHolder.cs
- ControlValuePropertyAttribute.cs
- RegionInfo.cs
- ResourcePool.cs
- ZipIOLocalFileDataDescriptor.cs
- GradientBrush.cs
- WebPartAddingEventArgs.cs
- PreProcessor.cs
- HijriCalendar.cs
- ConnectionPoint.cs
- CodeConstructor.cs
- DataBoundControlHelper.cs
- PeerHelpers.cs
- PopupRootAutomationPeer.cs
- DllNotFoundException.cs
- ValueHandle.cs
- FormsAuthenticationModule.cs
- WindowsTooltip.cs
- BStrWrapper.cs
- QilCloneVisitor.cs
- CompositeScriptReference.cs
- ContentElementAutomationPeer.cs
- __Error.cs
- MULTI_QI.cs
- ZoomPercentageConverter.cs
- DataTableReader.cs
- SqlBuilder.cs
- UrlParameterWriter.cs
- PropertyMapper.cs
- ListControl.cs
- ImageListImage.cs
- FileEnumerator.cs
- SoapTypeAttribute.cs
- DataBoundControlParameterTarget.cs
- DbDataSourceEnumerator.cs
- ObjectAssociationEndMapping.cs
- ConfigurationStrings.cs
- SecurityElement.cs
- NonVisualControlAttribute.cs
- ManualWorkflowSchedulerService.cs
- XpsDigitalSignature.cs
- QualifiedCellIdBoolean.cs
- FormatConvertedBitmap.cs
- BindingNavigator.cs
- LineVisual.cs
- ButtonFlatAdapter.cs
- UriTemplateClientFormatter.cs
- PropertyExpression.cs
- CounterSample.cs
- UrlPath.cs
- LogExtentCollection.cs
- DispatcherExceptionFilterEventArgs.cs
- Console.cs
- DataGridViewTextBoxColumn.cs
- SafeHandles.cs
- DigestTraceRecordHelper.cs
- MorphHelpers.cs
- InstallerTypeAttribute.cs
- IDictionary.cs
- ConfigurationValue.cs
- thaishape.cs
- ObjectDataSourceDisposingEventArgs.cs
- SoapMessage.cs
- HtmlTable.cs
- ReflectEventDescriptor.cs
- RegexTree.cs
- EventLogPermissionEntry.cs
- PrincipalPermission.cs
- EntityDataSourceValidationException.cs
- WebPartConnectionsCancelVerb.cs
- BackStopAuthenticationModule.cs
- ToolStripItemImageRenderEventArgs.cs
- dsa.cs
- PropertyEmitter.cs
- Base64Stream.cs
- XmlQueryOutput.cs
- HtmlGenericControl.cs
- QualifiedCellIdBoolean.cs
- Figure.cs
- SearchForVirtualItemEventArgs.cs
- DbTransaction.cs