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
- TextCharacters.cs
- TimeoutValidationAttribute.cs
- DataTemplate.cs
- DocumentGridContextMenu.cs
- List.cs
- SchemaObjectWriter.cs
- DataRecordObjectView.cs
- ImageSourceConverter.cs
- TrackBarRenderer.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- Int32AnimationBase.cs
- EntityCommandCompilationException.cs
- WorkflowViewService.cs
- TextSelectionProcessor.cs
- FileDataSourceCache.cs
- Mappings.cs
- ToolStripItemRenderEventArgs.cs
- UInt64.cs
- ResourceReferenceKeyNotFoundException.cs
- SamlAssertion.cs
- XmlSchemaObjectTable.cs
- TriState.cs
- SafeIUnknown.cs
- BitStack.cs
- DBDataPermissionAttribute.cs
- QilFactory.cs
- lengthconverter.cs
- TypeUtil.cs
- XmlValidatingReaderImpl.cs
- Assembly.cs
- CachedTypeface.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- RadioButton.cs
- DisposableCollectionWrapper.cs
- BaseAddressPrefixFilterElementCollection.cs
- UpDownEvent.cs
- XPathAxisIterator.cs
- SchemaComplexType.cs
- UrlMapping.cs
- DbDataRecord.cs
- EncoderParameters.cs
- ObjRef.cs
- NavigationHelper.cs
- RequestChannel.cs
- EditorPartCollection.cs
- AudioException.cs
- LineBreakRecord.cs
- TextDecoration.cs
- SecurityMode.cs
- XmlAttributeAttribute.cs
- StorageInfo.cs
- ErrorItem.cs
- InvalidComObjectException.cs
- FormViewInsertedEventArgs.cs
- CodeCompileUnit.cs
- WebPartConnectionCollection.cs
- WebPartTransformerAttribute.cs
- HorizontalAlignConverter.cs
- HelpKeywordAttribute.cs
- QueryExpr.cs
- IndexOutOfRangeException.cs
- QueryConverter.cs
- ComponentDispatcherThread.cs
- Transform3D.cs
- TemplateControl.cs
- ContentElement.cs
- KeyedCollection.cs
- _RequestCacheProtocol.cs
- NameScopePropertyAttribute.cs
- ScriptReferenceEventArgs.cs
- dbdatarecord.cs
- SymbolPair.cs
- SkinBuilder.cs
- ItemCheckedEvent.cs
- UnsafeMethods.cs
- TreeViewItem.cs
- PasswordRecovery.cs
- HtmlMobileTextWriter.cs
- IteratorDescriptor.cs
- ResourceBinder.cs
- XmlSchemaElement.cs
- Range.cs
- FieldNameLookup.cs
- BackStopAuthenticationModule.cs
- WaitForChangedResult.cs
- ManagementObjectSearcher.cs
- ImageFormatConverter.cs
- DefaultValueConverter.cs
- IProvider.cs
- PngBitmapEncoder.cs
- DynamicPropertyHolder.cs
- WorkflowElementDialogWindow.xaml.cs
- AssemblyName.cs
- DataColumnMapping.cs
- SafeSecurityHelper.cs
- NestPullup.cs
- LabelDesigner.cs
- Atom10ItemFormatter.cs
- WebConfigurationHost.cs
- TypeConverterHelper.cs