We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d679ae7 commit fbada52Copy full SHA for fbada52
1 file changed
RuntimeDetour/Platforms/Runtime/DetourRuntimeNETCore30Platform.cs
@@ -179,6 +179,8 @@ protected unsafe CorJitResult CompileMethodHook(
179
out byte* nativeEntry,
180
out uint nativeSizeOfCode) {
181
182
+ int _lastError = Marshal.GetLastPInvokeError();
183
+
184
nativeEntry = null;
185
nativeSizeOfCode = 0;
186
@@ -223,6 +225,8 @@ protected unsafe CorJitResult CompileMethodHook(
223
225
}
224
226
227
228
+ Marshal.SetLastPInvokeError(_lastError);
229
230
return result;
231
} finally {
232
hookEntrancy--;
0 commit comments