RegLoadAppKey function Null safety advapi32

int RegLoadAppKey(
  1. Pointer<Utf16> lpFile,
  2. Pointer<IntPtr> phkResult,
  3. int samDesired,
  4. int dwOptions,
  5. int Reserved
)

Loads the specified registry hive as an application hive.

LSTATUS RegLoadAppKeyW(
  LPCWSTR lpFile,
  PHKEY   phkResult,
  REGSAM  samDesired,
  DWORD   dwOptions,
  DWORD   Reserved);

Implementation

int RegLoadAppKey(Pointer<Utf16> lpFile, Pointer<IntPtr> phkResult,
    int samDesired, int dwOptions, int Reserved) {
  final _RegLoadAppKey = _advapi32.lookupFunction<
      Int32 Function(Pointer<Utf16> lpFile, Pointer<IntPtr> phkResult,
          Uint32 samDesired, Uint32 dwOptions, Uint32 Reserved),
      int Function(Pointer<Utf16> lpFile, Pointer<IntPtr> phkResult,
          int samDesired, int dwOptions, int Reserved)>('RegLoadAppKeyW');
  return _RegLoadAppKey(lpFile, phkResult, samDesired, dwOptions, Reserved);
}