More corelib cleanup (dotnet/coreclr#26993)
[mono-project.git] / netcore / System.Private.CoreLib / shared / Interop / Windows / Advapi32 / Interop.RegQueryValueEx.cs
blob72b8aa8f7bcf1bc4d9515e22e8c442c7dc63d294
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 #nullable enable
6 #if REGISTRY_ASSEMBLY
7 using Microsoft.Win32.SafeHandles;
8 #else
9 using Internal.Win32.SafeHandles;
10 #endif
11 using System.Runtime.InteropServices;
13 internal static partial class Interop
15 internal static partial class Advapi32
17 [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
18 internal static extern int RegQueryValueEx(
19 SafeRegistryHandle hKey,
20 string? lpValueName,
21 int[]? lpReserved,
22 ref int lpType,
23 [Out] byte[]? lpData,
24 ref int lpcbData);
26 [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
27 internal static extern int RegQueryValueEx(
28 SafeRegistryHandle hKey,
29 string? lpValueName,
30 int[]? lpReserved,
31 ref int lpType,
32 ref int lpData,
33 ref int lpcbData);
35 [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
36 internal static extern int RegQueryValueEx(
37 SafeRegistryHandle hKey,
38 string? lpValueName,
39 int[]? lpReserved,
40 ref int lpType,
41 ref long lpData,
42 ref int lpcbData);
44 [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW")]
45 internal static extern int RegQueryValueEx(
46 SafeRegistryHandle hKey,
47 string? lpValueName,
48 int[]? lpReserved,
49 ref int lpType,
50 [Out] char[]? lpData,
51 ref int lpcbData);