RegDeleteKeyTransacted function Null safety advapi32

int RegDeleteKeyTransacted(
  1. int hKey,
  2. Pointer<Utf16> lpSubKey,
  3. int samDesired,
  4. int Reserved,
  5. int hTransaction,
  6. Pointer<NativeType> pExtendedParameter
)

Deletes a subkey and its values from the specified platform-specific view of the registry as a transacted operation. Note that key names are not case sensitive.

LSTATUS RegDeleteKeyTransactedW(
  HKEY    hKey,
  LPCWSTR lpSubKey,
  REGSAM  samDesired,
  DWORD   Reserved,
  HANDLE  hTransaction,
  PVOID   pExtendedParameter);

Implementation

int RegDeleteKeyTransacted(int hKey, Pointer<Utf16> lpSubKey, int samDesired,
    int Reserved, int hTransaction, Pointer pExtendedParameter) {
  final _RegDeleteKeyTransacted = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKey, Pointer<Utf16> lpSubKey, Uint32 samDesired,
          Uint32 Reserved, IntPtr hTransaction, Pointer pExtendedParameter),
      int Function(
          int hKey,
          Pointer<Utf16> lpSubKey,
          int samDesired,
          int Reserved,
          int hTransaction,
          Pointer pExtendedParameter)>('RegDeleteKeyTransactedW');
  return _RegDeleteKeyTransacted(
      hKey, lpSubKey, samDesired, Reserved, hTransaction, pExtendedParameter);
}