Exemple #1
0
        internal static double GetEntryDouble(string name)
        {
            UIntPtr size;

            byte[] namePtr    = CreateUTF8String(name, out size);
            double retVal     = 0;
            ulong  lastChange = 0;
            int    status     = Interop.NT_GetEntryDouble(namePtr, size, ref lastChange, ref retVal);

            if (status == 0)
            {
                ThrowException(name, namePtr, size, NtType.Double);
            }
            return(retVal);
        }
Exemple #2
0
        internal static double GetEntryDouble(string name, double defaultValue)
        {
            UIntPtr size;

            byte[] namePtr    = CreateUTF8String(name, out size);
            double retVal     = 0;
            ulong  lastChange = 0;
            int    status     = Interop.NT_GetEntryDouble(namePtr, size, ref lastChange, ref retVal);

            if (status == 0)
            {
                return(defaultValue);
            }
            return(retVal);
        }