Esempio n. 1
0
        internal static bool SetEntryBooleanArray(string name, bool[] value, bool force = false)
        {
            UIntPtr size;

            byte[] namePtr = CreateUTF8String(name, out size);

            int[] valueIntArr = new int[value.Length];
            for (int i = 0; i < value.Length; i++)
            {
                valueIntArr[i] = value[i] ? 1 : 0;
            }

            int retVal = Interop.NT_SetEntryBooleanArray(namePtr, size, valueIntArr, (UIntPtr)valueIntArr.Length, force ? 1 : 0);

            return(retVal != 0);
        }