Marshal.SetLastPInvokeError(Int32) 方法

定义

设置当前线程上的最后一个平台调用错误。

public:
 static void SetLastPInvokeError(int error);
public static void SetLastPInvokeError (int error);
static member SetLastPInvokeError : int -> unit
Public Shared Sub SetLastPInvokeError (error As Integer)

参数

error
Int32

要设置的错误。

注解

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

适用于