Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / Microsoft / Win32 / SafeHandles / SafeRegistryHandle.cs / 1305376 / SafeRegistryHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // File: SafeRegistryHandle.cs // //[....] // // Implements Microsoft.Win32.SafeHandles.SafeRegistryHandle // // ====================================================================================== #if !FEATURE_PAL namespace Microsoft.Win32.SafeHandles { using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; [System.Security.SecurityCritical] public sealed class SafeRegistryHandle : SafeHandleZeroOrMinusOneIsInvalid { [System.Security.SecurityCritical] internal SafeRegistryHandle() : base(true) {} [System.Security.SecurityCritical] public SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) { SetHandle(preexistingHandle); } [System.Security.SecurityCritical] override protected bool ReleaseHandle() { return (RegCloseKey(handle) == Win32Native.ERROR_SUCCESS); } [DllImport(Win32Native.ADVAPI32), SuppressUnmanagedCodeSecurity, ResourceExposure(ResourceScope.None), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] internal static extern int RegCloseKey(IntPtr hKey); } } #endif // !FEATURE_PAL // 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
- ClientRolePrincipal.cs
- Expander.cs
- SignatureResourcePool.cs
- ZipIOCentralDirectoryFileHeader.cs
- LicFileLicenseProvider.cs
- HTMLTagNameToTypeMapper.cs
- TableProviderWrapper.cs
- SqlLiftIndependentRowExpressions.cs
- ByteAnimationUsingKeyFrames.cs
- DataGridViewCheckBoxColumn.cs
- SqlBooleanMismatchVisitor.cs
- SqlDuplicator.cs
- TraceHwndHost.cs
- TaskDesigner.cs
- UnsafeNativeMethods.cs
- ListItemParagraph.cs
- ExtendedPropertyCollection.cs
- DataBinder.cs
- XmlSchemaCollection.cs
- WindowsBrush.cs
- AnnotationComponentChooser.cs
- CreateRefExpr.cs
- NamespaceDisplay.xaml.cs
- MetafileHeaderEmf.cs
- TraceContextEventArgs.cs
- mactripleDES.cs
- AstTree.cs
- WmlTextBoxAdapter.cs
- FilterQuery.cs
- InheritedPropertyDescriptor.cs
- PublishLicense.cs
- Win32PrintDialog.cs
- IPHostEntry.cs
- EntityConnectionStringBuilderItem.cs
- ClientData.cs
- assemblycache.cs
- CoreSwitches.cs
- LogRecordSequence.cs
- ValidationErrorCollection.cs
- ScriptReferenceEventArgs.cs
- CodeTypeMember.cs
- WebServiceTypeData.cs
- TraceAsyncResult.cs
- ClusterRegistryConfigurationProvider.cs
- FixedPageProcessor.cs
- UserControl.cs
- LocatorManager.cs
- ListViewInsertEventArgs.cs
- ReadOnlyNameValueCollection.cs
- LongTypeConverter.cs
- OdbcReferenceCollection.cs
- GotoExpression.cs
- CustomAssemblyResolver.cs
- CmsUtils.cs
- JapaneseCalendar.cs
- FaultHandlingFilter.cs
- ComponentEditorForm.cs
- ImageListUtils.cs
- QuestionEventArgs.cs
- XmlBinaryWriter.cs
- QilScopedVisitor.cs
- ChineseLunisolarCalendar.cs
- InvalidDataException.cs
- PermissionToken.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ProvidePropertyAttribute.cs
- KeySplineConverter.cs
- AddDataControlFieldDialog.cs
- XmlDataSource.cs
- AnnotationComponentManager.cs
- TcpStreams.cs
- RoleService.cs
- ExpressionParser.cs
- CacheAxisQuery.cs
- MimeTypeAttribute.cs
- EncryptedData.cs
- Utils.cs
- StringAnimationUsingKeyFrames.cs
- codemethodreferenceexpression.cs
- _ChunkParse.cs
- SecurityContextKeyIdentifierClause.cs
- RepeatInfo.cs
- TextEditorSpelling.cs
- UserUseLicenseDictionaryLoader.cs
- Table.cs
- ReflectionUtil.cs
- HtmlUtf8RawTextWriter.cs
- TimeBoundedCache.cs
- SqlServices.cs
- TemplateField.cs
- ProcessHost.cs
- UpdateCommand.cs
- CodeAttributeDeclaration.cs
- Rotation3DAnimationBase.cs
- ProgressBarAutomationPeer.cs
- MarkupCompilePass1.cs
- ParallelSeparator.xaml.cs
- NullableFloatSumAggregationOperator.cs
- ClientProxyGenerator.cs
- TimeSpanMinutesConverter.cs