Alex Komissarov mi ha contattato segnalandomi un comportamento anomalo relativo alla Marshal.GetLastWin32Error dopo che ha modificato la mia classe seguendo i dettagli del mio blog di ieri.
Dopo qualche scambio di email mi ha fatto notare che la documentazione indica che usando [DllImport] il paramentro SetLastError e' di default False per C# mentre e' True per VB.NET

Cito:
Indicates whether the callee calls the SetLastError Win32 API function before returning from the attributed method.

Remarks
true to indicate that the callee will call SetLastError; otherwise, false. The default is false, except in Visual Basic.

Alla luce di vari test fatti, siamo giunti alla conclusione che la documentazione e' errata, il default e' False anche in VB.NET (per fortuna...) quindi usate SetLastError:=True se non volete avere degli strani risultati quando chiamate Marshal.GetLastWin32Error()