[DllImport("advapi32.dll", SetLastError=true)]
static extern int RegQueryValueEx(
IntPtr hKey,
string lpValueName,
int lpReserved,
out uint lpType,
IntPtr lpData,
out 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
None.
None.
Please add some!
[DllImport("advapi32.dll", EntryPoint="RegQueryValueEx", ExactSpelling=false, CharSet=CharSet.Unicode, SetLastError=true)]
private static extern int RegQueryValueEx_DllImport( IntPtr hKey, string lpValueName, int lpReserved, out uint lpType, StringBuilder lpData, ref uint lpcbData);
private void OpenRegKey()
{
UIntPtr HkeyLocalMachine = (UIntPtr)0x80000002;
const string lpSubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
const int KEY_QUERY_VALUE = 0x1;
IntPtr hKeyVal;
RegOpenKeyEx_DllImport(HkeyLocalMachine, lpSubKey, 0, KEY_QUERY_VALUE, out hKeyVal);
}
Do you know one? Please contribute it!