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
- DemultiplexingClientMessageFormatter.cs
- FixedSOMTable.cs
- TextTreeDeleteContentUndoUnit.cs
- CatalogZoneDesigner.cs
- StrokeCollectionDefaultValueFactory.cs
- DocumentPageTextView.cs
- RevocationPoint.cs
- SafeMarshalContext.cs
- Column.cs
- XhtmlTextWriter.cs
- RegistryDataKey.cs
- ConfigXmlDocument.cs
- PartialCachingControl.cs
- ToolStripItemEventArgs.cs
- NonBatchDirectoryCompiler.cs
- DefaultPrintController.cs
- HttpInputStream.cs
- CustomAttributeBuilder.cs
- CalendarTable.cs
- activationcontext.cs
- HttpRequestTraceRecord.cs
- DesignerTextViewAdapter.cs
- InvalidCommandTreeException.cs
- Buffer.cs
- DateTimeHelper.cs
- CriticalFinalizerObject.cs
- basecomparevalidator.cs
- SoapReflectionImporter.cs
- ModuleBuilderData.cs
- SiteMapDataSource.cs
- HttpCacheParams.cs
- RawTextInputReport.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SqlDataSourceDesigner.cs
- DispatcherExceptionEventArgs.cs
- DeviceContext.cs
- Point3DCollectionConverter.cs
- TdsParser.cs
- SamlSubjectStatement.cs
- SemaphoreFullException.cs
- RowsCopiedEventArgs.cs
- WebRequestModulesSection.cs
- _UncName.cs
- GiveFeedbackEventArgs.cs
- HttpResponseBase.cs
- QilExpression.cs
- GPRECTF.cs
- SoundPlayer.cs
- CreateUserErrorEventArgs.cs
- GeometryGroup.cs
- CodePrimitiveExpression.cs
- FormViewRow.cs
- BamlBinaryWriter.cs
- OutputCacheModule.cs
- TextRange.cs
- RightNameExpirationInfoPair.cs
- ServiceHostingEnvironment.cs
- XmlSchemaAnnotation.cs
- Form.cs
- XmlSchemaImport.cs
- TypeUsage.cs
- Material.cs
- ConfigurationSectionHelper.cs
- ProjectionCamera.cs
- Char.cs
- HScrollProperties.cs
- UInt16Storage.cs
- Stack.cs
- AssemblyNameProxy.cs
- AutomationElementCollection.cs
- VersionUtil.cs
- EntityDataSourceSelectingEventArgs.cs
- CompatibleComparer.cs
- BamlTreeNode.cs
- ReferentialConstraint.cs
- DateTimeOffsetConverter.cs
- MemoryStream.cs
- DeclaredTypeElementCollection.cs
- DataGridViewCellParsingEventArgs.cs
- MultidimensionalArrayItemReference.cs
- NetWebProxyFinder.cs
- MetadataItemEmitter.cs
- PrimarySelectionAdorner.cs
- EnumMember.cs
- ChildChangedEventArgs.cs
- SqlDependency.cs
- XmlWrappingWriter.cs
- XmlWrappingReader.cs
- TableCellAutomationPeer.cs
- UnauthorizedAccessException.cs
- BamlTreeNode.cs
- ParameterReplacerVisitor.cs
- RegexFCD.cs
- FileChangesMonitor.cs
- counter.cs
- NetworkInterface.cs
- EntityClientCacheEntry.cs
- TextTabProperties.cs
- ExpressionBuilder.cs
- QuaternionAnimationBase.cs