+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Microsoft.Win32.SafeHandles;
-using System;
-using System.Runtime.InteropServices;
-
-internal partial class Interop
-{
- internal partial class Advapi32
- {
- [DllImport(Libraries.Advapi32)]
- internal extern static int RegCloseKey(IntPtr hKey);
- }
-}
<Compile Include="$(CommonPath)\Interop\Windows\advapi32\Interop.RegistryOptions.cs">
<Link>Common\Interop\Windows\Interop.RegistryOptions.cs</Link>
</Compile>
+ <Compile Include="$(CommonPath)\CoreLib\Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs">
+ <Link>Common\CoreLib\Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs</Link>
+ </Compile>
<Compile Include="Microsoft\Win32\Registry.cs" />
<Compile Include="Microsoft\Win32\RegistryKey.cs" />
<Compile Include="Microsoft\Win32\RegistryKeyPermissionCheck.cs" />
<Compile Include="Microsoft\Win32\RegistryValueOptions.cs" />
<Compile Include="Microsoft\Win32\RegistryView.cs" />
<Compile Include="Microsoft\Win32\ThrowHelper.cs" />
- <Compile Include="Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs" />
<Compile Include="System\Security\AccessControl\RegistryRights.cs" />
<Compile Include="System\Security\AccessControl\RegistrySecurity.cs" />
</ItemGroup>
<Link>Common\Interop\Windows\Interop.Errors.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.FormatMessage.cs">
- <Link>Common\Interop\Windows\Interop.FormatMessage.cs</Link>
+ <Link>Common\Corelib\Interop\Windows\Interop.FormatMessage.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\advapi32\Interop.RegCloseKey.cs">
- <Link>Common\Interop\Windows\Interop.RegCloseKey.cs</Link>
+ <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\advapi32\Interop.RegCloseKey.cs">
+ <Link>Common\CoreLib\Interop\Windows\Interop.RegCloseKey.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\advapi32\Interop.RegConnectRegistry.cs">
<Link>Common\Interop\Windows\Interop.RegConnectRegistry.cs</Link>
<Link>Common\CoreLib\Interop\Windows\Interop.SECURITY_ATTRIBUTES.cs</Link>
</Compile>
<Compile Include="Microsoft\Win32\RegistryKey.Windows.cs" />
- <Compile Include="Microsoft\Win32\SafeHandles\SafeRegistryHandle.Windows.cs" />
+ <Compile Include="$(CommonPath)\CoreLib\Microsoft\Win32\SafeHandles\SafeRegistryHandle.Windows.cs">
+ <Link>Common\CoreLib\Microsoft\Win32\SafeHandles\SafeRegistryHandle.Windows.cs</Link>
+ </Compile>
<Compile Include="System\Security\AccessControl\RegistrySecurity.Windows.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Win32.SafeHandles
-{
-#if REGISTRY_ASSEMBLY
- public
-#else
- internal
-#endif
- sealed partial class SafeRegistryHandle : SafeHandleZeroOrMinusOneIsInvalid
- {
- protected override bool ReleaseHandle() =>
- Interop.Advapi32.RegCloseKey(handle) == Interop.Errors.ERROR_SUCCESS;
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Win32.SafeHandles
-{
-#if REGISTRY_ASSEMBLY
- public
-#else
- internal
-#endif
- sealed partial class SafeRegistryHandle : SafeHandleZeroOrMinusOneIsInvalid
- {
- internal SafeRegistryHandle() : base(true) { }
-
- public SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle)
- {
- SetHandle(preexistingHandle);
- }
- }
-}