Marshal.SetLastPInvokeError(Int32) Method

Definition

Sets the last platform invoke error on the current thread.

public static void SetLastPInvokeError (int error);

Parameters

error
Int32

The error to set.

Remarks

The last platform invoke error is stored per-thread and can be retrieved using GetLastPInvokeError.

Applies to

Product Versions
.NET 6, 7, 8, 9