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
- DictionaryContent.cs
- PaperSize.cs
- SessionEndedEventArgs.cs
- ValidateNames.cs
- SafeNativeMethods.cs
- Funcletizer.cs
- NativeMethods.cs
- ClientTargetSection.cs
- UpdateCommand.cs
- URLString.cs
- HtmlControl.cs
- SmiContext.cs
- GridItemPattern.cs
- ToolStripProgressBar.cs
- recordstate.cs
- OLEDB_Util.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- RemotingException.cs
- XPathNode.cs
- CompositeDataBoundControl.cs
- XmlObjectSerializerContext.cs
- TextElement.cs
- FieldMetadata.cs
- ConfigurationElementProperty.cs
- MasterPage.cs
- DeviceFiltersSection.cs
- DbConnectionPoolGroupProviderInfo.cs
- UserNameSecurityTokenAuthenticator.cs
- UriParserTemplates.cs
- WebControlsSection.cs
- BuildManager.cs
- Utils.cs
- IPeerNeighbor.cs
- CallbackHandler.cs
- _NegoState.cs
- GroupQuery.cs
- PlacementWorkspace.cs
- RegexCode.cs
- GridEntryCollection.cs
- FormattedTextSymbols.cs
- Registration.cs
- EntityChangedParams.cs
- PresentationTraceSources.cs
- ListViewItemEventArgs.cs
- DateTimeOffset.cs
- SatelliteContractVersionAttribute.cs
- SafeEventLogWriteHandle.cs
- MetaModel.cs
- HasRunnableWorkflowEvent.cs
- ipaddressinformationcollection.cs
- BinaryReader.cs
- NativeMethodsCLR.cs
- InlineCategoriesDocument.cs
- SoapSchemaImporter.cs
- IfJoinedCondition.cs
- _IPv6Address.cs
- XmlSchemaSimpleType.cs
- FreezableOperations.cs
- StructuredTypeEmitter.cs
- UpDownBase.cs
- WmpBitmapDecoder.cs
- ValidationError.cs
- InputDevice.cs
- AssemblyUtil.cs
- DeploymentSection.cs
- NotFiniteNumberException.cs
- VBCodeProvider.cs
- ImportedNamespaceContextItem.cs
- DecoderFallbackWithFailureFlag.cs
- HWStack.cs
- HtmlToClrEventProxy.cs
- InputBinder.cs
- UnsafeNativeMethods.cs
- Themes.cs
- NoResizeSelectionBorderGlyph.cs
- TypedReference.cs
- X509CertificateValidationMode.cs
- ConsoleTraceListener.cs
- EntityDataSourceDesigner.cs
- SatelliteContractVersionAttribute.cs
- WebPartRestoreVerb.cs
- TreeNodeStyleCollection.cs
- SecurityHeaderLayout.cs
- UriTemplateLiteralPathSegment.cs
- CreationContext.cs
- AtlasWeb.Designer.cs
- QueryCacheManager.cs
- Metafile.cs
- ServerReliableChannelBinder.cs
- WebPartDisplayMode.cs
- Main.cs
- CreateParams.cs
- EntityClassGenerator.cs
- PointConverter.cs
- DataGridColumn.cs
- AttributeUsageAttribute.cs
- SizeLimitedCache.cs
- ArrayList.cs
- RightsManagementInformation.cs
- ScriptMethodAttribute.cs