Returns the last error incurred by Win32 code executed via Marshal. Note that the target function must have had the setLastError metadata flag set-- how this is done varies depending upon the source language used.
[Visual Basic] Public Shared Function GetLastWin32Error() As Integer [C#] public static int GetLastWin32Error(); [C++] public: static int GetLastWin32Error(); [JScript] public static function GetLastWin32Error() : int;
Last Win32 error code.
Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace