corert icon indicating copy to clipboard operation
corert copied to clipboard

Marshal.GetLastWin32Error in CoreLib

Open jkotas opened this issue 9 years ago • 1 comments

Number of file I/O and similar APIs will move to CoreLib as part of NetStandard2.0 work. The implementation of these APIs depend on Marshal.GetLastWin32Error that is not available in CoreLib today.

The current solution that calls Interop.mincore.GetLastError() cannot be used for this as is because of it only works for APIs with trivial marshaling that won't overwrite the last error. It is not the case of many file I/O APIs today.

To unblock, I am adding hack to src\System.Private.CoreLib\src\Interop\Interop.manual.cs. This hack should be removed once this issue is fixed.

jkotas avatar Dec 28 '16 16:12 jkotas

https://github.com/dotnet/corert/pull/2452

shrah avatar Jan 08 '17 07:01 shrah