RegOpenKeyEx function Null safety advapi32
Opens the specified registry key. Note that key names are not case sensitive.
LSTATUS RegOpenKeyExW(
HKEY hKey,
LPCWSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
PHKEY phkResult
);
Implementation
int RegOpenKeyEx(int hKey, Pointer<Utf16> lpSubKey, int ulOptions,
int samDesired, Pointer<IntPtr> phkResult) {
final _RegOpenKeyEx = _advapi32.lookupFunction<
Int32 Function(IntPtr hKey, Pointer<Utf16> lpSubKey, Uint32 ulOptions,
Uint32 samDesired, Pointer<IntPtr> phkResult),
int Function(int hKey, Pointer<Utf16> lpSubKey, int ulOptions,
int samDesired, Pointer<IntPtr> phkResult)>('RegOpenKeyExW');
return _RegOpenKeyEx(hKey, lpSubKey, ulOptions, samDesired, phkResult);
}