Marshal::GetHRForLastWin32Error Method ()
Returns the HRESULT corresponding to the last error incurred by Win32 code executed using Marshal.
Assembly: mscorlib (in mscorlib.dll)
The target function must have had the setLastError metadata flag set. For example, the SetLastError field of the System.Runtime.InteropServices::DllImportAttribute must be true. The process for setting this flag depends on the source language used: C# and C++ are false by default, but the Declare statement in Visual Basic is true.
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1