Ejemplo n.º 1
0
        /// <summary>
        /// Return a string associated with a given error code.
        /// </summary>
        /// <param name="result">Error code</param>
        /// <returns>The string</returns>
        public static string ErrorToString(KeystoneError result)
        {
            IntPtr error = KeystoneImports.ErrorToString(result);

            if (error != IntPtr.Zero)
            {
                return(Marshal.PtrToStringAnsi(error));
            }
            return(string.Empty);
        }
Ejemplo n.º 2
0
        public static string ErrorToString(KeystoneError result)
        {
            IntPtr ptr = KeystoneImports.ErrorToString(result);

            return(ptr != IntPtr.Zero ? Marshal.PtrToStringAnsi(ptr) : string.Empty);
        }