RegConnectRegistry function Null safety advapi32
Establishes a connection to a predefined registry key on another computer.
LSTATUS RegConnectRegistryW(
LPCWSTR lpMachineName,
HKEY hKey,
PHKEY phkResult
);
Implementation
int RegConnectRegistry(
Pointer<Utf16> lpMachineName, int hKey, Pointer<IntPtr> phkResult) {
final _RegConnectRegistry = _advapi32.lookupFunction<
Int32 Function(
Pointer<Utf16> lpMachineName, IntPtr hKey, Pointer<IntPtr> phkResult),
int Function(Pointer<Utf16> lpMachineName, int hKey,
Pointer<IntPtr> phkResult)>('RegConnectRegistryW');
return _RegConnectRegistry(lpMachineName, hKey, phkResult);
}