RegOpenUserClassesRoot function Null safety advapi32

int RegOpenUserClassesRoot(
  1. int hToken,
  2. int dwOptions,
  3. int samDesired,
  4. Pointer<IntPtr> phkResult
)

Retrieves a handle to the HKEY_CLASSES_ROOT key for a specified user. The user is identified by an access token.

LSTATUS RegOpenUserClassesRoot(
  HANDLE hToken,
  DWORD  dwOptions,
  REGSAM samDesired,
  PHKEY  phkResult);

Implementation

int RegOpenUserClassesRoot(
    int hToken, int dwOptions, int samDesired, Pointer<IntPtr> phkResult) {
  final _RegOpenUserClassesRoot = _advapi32.lookupFunction<
      Int32 Function(IntPtr hToken, Uint32 dwOptions, Uint32 samDesired,
          Pointer<IntPtr> phkResult),
      int Function(int hToken, int dwOptions, int samDesired,
          Pointer<IntPtr> phkResult)>('RegOpenUserClassesRoot');
  return _RegOpenUserClassesRoot(hToken, dwOptions, samDesired, phkResult);
}