Desktop Functions: Smart Device Functions:
|
Search Results for "RegOpenKey" in [All]rapi
uint ret = CeRegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\TestApp\\Settings",0,0x1,out key);
uint ret = CeRegOpenKeyEx(HKEY_CURRENT_USER,"Software\\TestApp\\Settings",0,0x1,out key);
public static extern uint CeRegOpenKeyEx( function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeRegOpenKeyExRAPI.asp
uint ret = SMLib.CeRegOpenKeyEx(HKEY_CURRENT_USER,"Software\\TestApp\\Settings",0,0x1,out key);
ret = CeRegOpenKeyEx(HKEY_CURRENT_USER,"Software\\TestApp\\Settings",0,0x1,out key);
uint ret = CeRegOpenKeyEx(HKEY_CURRENT_USER,"Software\\TestApp\\Settings",0,0x1,out key);
Dim ret As UInteger = CeRegOpenKeyEx(HKEY_CURRENT_USER, "Software\TestApp\Settings", 0, &H1, key) function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefceregopenkeyexrapi.asp coredll7: RegOpenKeyEx
advapi328: RegCloseKey
Dim ErrororResultValue1 As Integer = RegOpenKeyEx(inthKey, strlpSubKey, 0, KEY_ALL_ACCESS, hkeyKeytoOpen) 9: RegOpenKey
public static extern int RegOpenKeyEx(
Declare Auto Function RegOpenKeyEx Lib "advapi32.dll" ( For compatibility with 16-bit versions of Windows only 'RegOpenKey' is available.
ret = RegOpenKeyEx(hKey, Name, 0, Rights Or Options, hSubKey)
if (RegOpenKeyEx(rootKey, keyPath, 0, KEY_READ, out hKey) == 0)
' Basis from: http://www.pinvoke.net/default.aspx/advapi32/RegOpenKeyEx.html
Private Declare Auto Function RegOpenKeyEx Lib "advapi32.dll" (ByVal hKey As System.IntPtr, ByVal lpSubKey As System.String, ByVal ulOptions As System.Int32, ByVal samDesired As System.Int32, ByRef phkResult As System.Int32) As System.Int32
Dim Result As System.Int32 = RegOpenKeyEx(GetRegistryKeyHandle(ParentKey), SubKeyName, 0, Rights Or Options, SubKeyHandle)
int subKeyHandle, result = RegOpenKeyEx(_getRegistryKeyHandle(parentKey), subKeyName, 0, rights | (int)options, out subKeyHandle);
//Get the key represented by the pointer returned by RegOpenKeyEx
public static extern int RegOpenKeyEx(IntPtr hKey, string subKey, int ulOptions, int samDesired, out int phkResult);
//Get the key represented by the pointer returned by RegOpenKeyEx All code above is for versions of .NET Framework prior to 4.0. In version 4.0, Microsoft.Win32.SafeHandles.SafeRegistryHandle is now public instead of private causing the examples above to error. This was to added support for Microsoft.Win32.RegistryView which negates the need to directly call advapi32.dll and the RegOpenKeyEx function by making the process managed. Here are examples of how to access 32-bit registry keys from a 64-bit application using .NET Framework 4.0: 10: RegOpenKeyEx
public static extern int RegOpenKeyEx(
Declare Auto Function RegOpenKeyEx Lib "advapi32.dll" ( For compatibility with 16-bit versions of Windows only 'RegOpenKey' is available.
ret = RegOpenKeyEx(hKey, Name, 0, Rights Or Options, hSubKey)
if (RegOpenKeyEx(rootKey, keyPath, 0, KEY_READ, out hKey) == 0)
' Basis from: http://www.pinvoke.net/default.aspx/advapi32/RegOpenKeyEx.html
Private Declare Auto Function RegOpenKeyEx Lib "advapi32.dll" (ByVal hKey As System.IntPtr, ByVal lpSubKey As System.String, ByVal ulOptions As System.Int32, ByVal samDesired As System.Int32, ByRef phkResult As System.Int32) As System.Int32
Dim Result As System.Int32 = RegOpenKeyEx(GetRegistryKeyHandle(ParentKey), SubKeyName, 0, Rights Or Options, SubKeyHandle)
int subKeyHandle, result = RegOpenKeyEx(_getRegistryKeyHandle(parentKey), subKeyName, 0, rights | (int)options, out subKeyHandle);
//Get the key represented by the pointer returned by RegOpenKeyEx
public static extern int RegOpenKeyEx(IntPtr hKey, string subKey, int ulOptions, int samDesired, out int phkResult); All code above is for versions of .NET Framework prior to 4.0. In version 4.0, Microsoft.Win32.SafeHandles.SafeRegistryHandle is now public instead of private causing the examples above to error. This was to added support for Microsoft.Win32.RegistryView which negates the need to directly call advapi32.dll and the RegOpenKeyEx function by making the process managed. Here are examples of how to access 32-bit registry keys from a 64-bit application using .NET Framework 4.0: 11: RegQueryValue
'An alternative to this section would be to call RegOpenKeyEx and convert value to intPtr:
'RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Environment", 0, KEY_SET_VALUE Or KEY_ENUMERATE_SUB_KEYS, subKey)
if (RegOpenKeyEx(rootKey, keyPath, 0, KEY_READ, out hKey) == 0)
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, registryPath, 0, READ_FLAG_MASK, out hKey) == 0) 12: RegQueryValueEx
'An alternative to this section would be to call RegOpenKeyEx and convert value to intPtr:
'RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Environment", 0, KEY_SET_VALUE Or KEY_ENUMERATE_SUB_KEYS, subKey)
if (RegOpenKeyEx(rootKey, keyPath, 0, KEY_READ, out hKey) == 0)
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, registryPath, 0, READ_FLAG_MASK, out hKey) == 0) 13: RegSetValueEx
uint retVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, registryPath, 0, WRITE_FLAG_MASK, out hKey); |