I've seen a lot of posts online of people asking how to get the error message associated with a Windows error code. I've also seen a lot of posts online of people proposing some horribly difficult solution. So here's a nice and simple one I happened to stumble upon:
string win32ErrorMessage = new System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error()).Message;
Geen opmerkingen:
Een reactie posten