<
Description>
The last Win32 error can be reset as a result of making managed calls, due to P/Invokes called by the runtime itself. In order to ensure the correctness of the value returned by GetLastWin32Error, place the call immediately after the relevant platform invoke call in your code.<
/Description>
<
Name>
Call GetLastError immediately after P/Invoke<
/Name>
<
Resolution>
Method {0} called GetLastWin32Error but the immediately preceding call to {1} is not a P/Invoke statement. Move the call to GetLastWin32Error so that it immediately follows the relevant platform invoke call.<
/Resolution>