[DllImport("advapi32.dll", SetLastError=true)]
static extern int RegQueryValueEx(
IntPtr hKey,
string lpValueName,
int lpReserved,
out uint lpType,
IntPtr lpData,
ref uint lpcbData);
Declare Function RegQueryValueEx Lib "advapi32.dll" (ByRef hKey As Integer, _
lpValueName As String, _
lpReserved As Integer, _
lpType As Integer, _
ByRef lpData As Integer, _
lpcbData As Integer) As Integer
Type | Value |
REG_NONE | 0 |
REG_SZ | 1 |
REG_EXPAND_SZ | 2 |
REG_BINARY | 3 |
REG_DWORD | 4 |
REG_DWORD_LITTLE_ENDIAN | 4 |
REG_DWORD_BIG_ENDIAN | 5 |
REG_LINK | 6 |
REG_MULTI_SZ | 7 |
None.
Managed APIs won't let you get raw REG_EXPAND_SZ values. You'll be forced to use Win32 APIs for this. Also, since .NET won'T give access to the key pointer, you'll have to browse the registry using pInvoke.
None.
None.
namespace Microsoft.Win32;
classes Registery, RegistryKey