diff options
author | Faizur Rahman <shrah@microsoft.com> | 2017-01-06 03:00:48 +0300 |
---|---|---|
committer | Faizur Rahman <shrah@microsoft.com> | 2017-01-08 09:56:38 +0300 |
commit | 1ed5178661106c68ac56d729071057995317c3f6 (patch) | |
tree | 00fd2b0cad3f341aa3e8487907bcf4eb3b425f28 /src/Native/Runtime/PalRedhawkFunctions.h | |
parent | ba8ac12b991379de0e1aa90510bc2ef85a14c08c (diff) |
Implement SetLastError DllImport flag functionality
Call PInvokeMarshal.SaveLastWin32Error after the P/Invoke call to ensure
the last error is saved in thread local variable which can be later
accessed through PInvokeMarshal.GetLastWin32Error.
Additionally, I have rename ParameterAttributes to
ParameterMetadataAttributes to avoid the confusion with
System.Reflection.ParameterAttributes.
This change also makes sure PInvoke works on Unix and also get rids of
build warning on windows.
Diffstat (limited to 'src/Native/Runtime/PalRedhawkFunctions.h')
-rw-r--r-- | src/Native/Runtime/PalRedhawkFunctions.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Native/Runtime/PalRedhawkFunctions.h b/src/Native/Runtime/PalRedhawkFunctions.h index 0bb53e3e7..f030ce35e 100644 --- a/src/Native/Runtime/PalRedhawkFunctions.h +++ b/src/Native/Runtime/PalRedhawkFunctions.h @@ -94,12 +94,6 @@ inline UInt32 PalGetEnvironmentVariable(__in_z_opt LPCSTR arg1, __out_z_opt LPST } #endif -extern "C" UInt32 __stdcall GetLastError(); -inline UInt32 PalGetLastError() -{ - return GetLastError(); -} - extern "C" void * __stdcall GetProcAddress(HANDLE, const char *); inline void * PalGetProcAddress(HANDLE arg1, const char * arg2) { |