コード例 #1
0
        private static string GetDescriptionFromResultCode(int resultCode)
        {
            IntPtr lpBuffer = IntPtr.Zero;
            int    num      = (int)ResultDescriptor.FormatMessageW(4864, IntPtr.Zero, resultCode, 0, ref lpBuffer, 0, IntPtr.Zero);
            string str      = Marshal.PtrToStringUni(lpBuffer);

            Marshal.FreeHGlobal(lpBuffer);
            return(str);
        }