Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Configuration / Microsoft / Win32 / SafeCryptContextHandle.cs / 1 / 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. //------------------------------------------------------------------------------ //// 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
- StringValueConverter.cs
- NonBatchDirectoryCompiler.cs
- EdmComplexPropertyAttribute.cs
- Timer.cs
- MsmqInputMessagePool.cs
- GridViewEditEventArgs.cs
- QilReference.cs
- TraceLevelStore.cs
- PointAnimationUsingKeyFrames.cs
- EventEntry.cs
- BitmapMetadata.cs
- HotCommands.cs
- StackSpiller.Bindings.cs
- InputLanguageSource.cs
- BoundColumn.cs
- ExclusiveNamedPipeTransportManager.cs
- XmlUtil.cs
- ShapeTypeface.cs
- MetabaseSettings.cs
- PtsContext.cs
- SQLResource.cs
- BitmapImage.cs
- ListControl.cs
- StrongNameKeyPair.cs
- SqlCacheDependencySection.cs
- ArrangedElementCollection.cs
- FileEnumerator.cs
- MeshGeometry3D.cs
- SeekableReadStream.cs
- CriticalExceptions.cs
- ColorMap.cs
- ProcessStartInfo.cs
- DropSource.cs
- Path.cs
- FlowchartDesignerCommands.cs
- RealizationContext.cs
- MarshalByValueComponent.cs
- SignatureHelper.cs
- SingleAnimationBase.cs
- SamlConditions.cs
- ImpersonationOption.cs
- ProxyWebPartConnectionCollection.cs
- HMACRIPEMD160.cs
- ConnectionProviderAttribute.cs
- DynamicValidatorEventArgs.cs
- SqlBinder.cs
- Renderer.cs
- WebControlAdapter.cs
- StreamAsIStream.cs
- DbConnectionPool.cs
- BooleanExpr.cs
- BuildProvider.cs
- LineBreak.cs
- XslAstAnalyzer.cs
- HtmlTableRowCollection.cs
- RoleServiceManager.cs
- safePerfProviderHandle.cs
- Pkcs7Signer.cs
- DetailsViewUpdatedEventArgs.cs
- MobileComponentEditorPage.cs
- MailMessageEventArgs.cs
- clipboard.cs
- AlternateView.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ListBase.cs
- CacheEntry.cs
- IPAddressCollection.cs
- UrlMappingsModule.cs
- SmiEventSink.cs
- HttpProfileBase.cs
- GCHandleCookieTable.cs
- TextRangeProviderWrapper.cs
- _AutoWebProxyScriptWrapper.cs
- StringArrayEditor.cs
- DataPagerFieldCollection.cs
- Storyboard.cs
- ResourceWriter.cs
- TextStore.cs
- BufferedWebEventProvider.cs
- SymbolPair.cs
- MemberRelationshipService.cs
- AstTree.cs
- StringSorter.cs
- ActivitySurrogate.cs
- FilteredDataSetHelper.cs
- PolyBezierSegment.cs
- listitem.cs
- ProfilePropertySettings.cs
- TextAdaptor.cs
- UnhandledExceptionEventArgs.cs
- OdbcConnectionFactory.cs
- DelayedRegex.cs
- EventDescriptor.cs
- MLangCodePageEncoding.cs
- ByteBufferPool.cs
- validation.cs
- TypeContext.cs
- Dictionary.cs
- TypeToken.cs
- SqlUtil.cs