Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than advapi32, prefix the name with the module name and a period.
RegQueryValueEx (advapi32)
.
C# Signature:
[DllImport("advapi32.dll", SetLastError=true)]
static extern int RegQueryValueEx(
IntPtr hKey,
string lpValueName,
int lpReserved,
out uint lpType,
IntPtr lpData,
ref uint lpcbData);
VB Signature:
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
Key Types:
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
User-Defined Types:
None.
Notes:
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.
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).