internal static bool GetEntryBoolean(string name) { UIntPtr size; byte[] namePtr = CreateUTF8String(name, out size); int boolean = 0; ulong lc = 0; int status = Interop.NT_GetEntryBoolean(namePtr, size, ref lc, ref boolean); if (status == 0) { ThrowException(name, namePtr, size, NtType.Boolean); } return(boolean != 0); }
internal static bool GetEntryBoolean(string name, bool defaultValue) { UIntPtr size; byte[] namePtr = CreateUTF8String(name, out size); int boolean = 0; ulong lc = 0; int status = Interop.NT_GetEntryBoolean(namePtr, size, ref lc, ref boolean); if (status == 0) { return(defaultValue); } return(boolean != 0); }