-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use RegDeleteTree in RegistryKey.DeleteSubKeyTree
- Loading branch information
1 parent
18e20d8
commit 1404726
Showing
3 changed files
with
27 additions
and
52 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteTree.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#if REGISTRY_ASSEMBLY | ||
using Microsoft.Win32.SafeHandles; | ||
#else | ||
using Internal.Win32.SafeHandles; | ||
#endif | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Advapi32 | ||
{ | ||
[LibraryImport(Libraries.Advapi32, EntryPoint = "RegDeleteTreeW", StringMarshalling = StringMarshalling.Utf16)] | ||
internal static partial int RegDeleteTree( | ||
SafeRegistryHandle hKey, | ||
string lpSubKey); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters