Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / Tools / WSATConfig / Configuration / SafeRegistryKey.cs / 1 / SafeRegistryKey.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.Tools.ServiceModel.WsatConfig { using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using Microsoft.Win32.SafeHandles; sealed class SafeRegistryKey : SafeHandleZeroOrMinusOneIsInvalid { [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] internal SafeRegistryKey() : base(false) { } [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] internal SafeRegistryKey(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) { SetHandle(preexistingHandle); } protected override bool ReleaseHandle() { // Returns a Win32 error code, 0 for success int r = SafeNativeMethods.RegCloseKey(handle); return r == 0; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AdapterDictionary.cs
- SigningCredentials.cs
- HighContrastHelper.cs
- XPathConvert.cs
- GlobalProxySelection.cs
- WebBrowserUriTypeConverter.cs
- UserInitiatedNavigationPermission.cs
- ViewLoader.cs
- TrailingSpaceComparer.cs
- IdentityHolder.cs
- SqlCacheDependencyDatabaseCollection.cs
- CompModSwitches.cs
- UriScheme.cs
- LinkDescriptor.cs
- DataFieldConverter.cs
- ServiceModelConfigurationSectionGroup.cs
- ReflectionUtil.cs
- ToolStripManager.cs
- Enum.cs
- OleDbRowUpdatingEvent.cs
- ContextStaticAttribute.cs
- Int32EqualityComparer.cs
- TrackingStringDictionary.cs
- DeferredTextReference.cs
- TreeViewItemAutomationPeer.cs
- SecurityContext.cs
- IconEditor.cs
- SpeakInfo.cs
- EmptyStringExpandableObjectConverter.cs
- ConnectionConsumerAttribute.cs
- SerializationObjectManager.cs
- ProxyManager.cs
- FormViewModeEventArgs.cs
- XmlDataProvider.cs
- SerializationAttributes.cs
- HostingEnvironmentException.cs
- UnsettableComboBox.cs
- TimeStampChecker.cs
- CoreSwitches.cs
- RadioButtonFlatAdapter.cs
- SqlProfileProvider.cs
- StringOutput.cs
- SqlUserDefinedAggregateAttribute.cs
- WindowsTab.cs
- DelegateArgument.cs
- RootNamespaceAttribute.cs
- FlowLayoutSettings.cs
- XmlDataSourceView.cs
- LowerCaseStringConverter.cs
- SerializationInfo.cs
- ParseHttpDate.cs
- CngKeyBlobFormat.cs
- PersonalizationStateQuery.cs
- TrustLevel.cs
- Hyperlink.cs
- Table.cs
- HttpStaticObjectsCollectionBase.cs
- UnauthorizedAccessException.cs
- _Win32.cs
- DocumentApplicationJournalEntry.cs
- MenuEventArgs.cs
- XmlSchema.cs
- LabelLiteral.cs
- TrackPoint.cs
- AspCompat.cs
- Effect.cs
- SqlDataRecord.cs
- ListItemCollection.cs
- IgnoreFlushAndCloseStream.cs
- ToggleButton.cs
- ADMembershipProvider.cs
- RegexCompilationInfo.cs
- UIElement3D.cs
- ConditionalDesigner.cs
- TreeViewCancelEvent.cs
- FormsAuthenticationUser.cs
- SingleObjectCollection.cs
- ReferenceConverter.cs
- ResourceExpression.cs
- WindowProviderWrapper.cs
- CommonProperties.cs
- templategroup.cs
- SHA256Managed.cs
- TypeDependencyAttribute.cs
- ProviderConnectionPoint.cs
- ManagementInstaller.cs
- StateItem.cs
- Attributes.cs
- Separator.cs
- TextParagraph.cs
- DataGridDesigner.cs
- X509ChainElement.cs
- MutexSecurity.cs
- ContextMenuStripActionList.cs
- VisualStyleInformation.cs
- NavigationPropertyEmitter.cs
- MenuCommands.cs
- GradientBrush.cs
- NativeCompoundFileAPIs.cs
- SecurityPermission.cs