Win32Exception Construtores

Definição

Inicializa uma nova instância da classe Win32Exception.Initializes a new instance of the Win32Exception class.

Sobrecargas

Win32Exception()

Inicializa uma nova instância da classe Win32Exception com o último erro Win32 que ocorreu.Initializes a new instance of the Win32Exception class with the last Win32 error that occurred.

Win32Exception(Int32)

Inicializa uma nova instância da classe Win32Exception com o erro especificado.Initializes a new instance of the Win32Exception class with the specified error.

Win32Exception(String)

Inicializa uma nova instância da classe Win32Exception com a descrição detalhada especificada.Initializes a new instance of the Win32Exception class with the specified detailed description.

Win32Exception(Int32, String)

Inicializa uma nova instância da classe Win32Exception com o erro especificado e a descrição detalhada especificada.Initializes a new instance of the Win32Exception class with the specified error and the specified detailed description.

Win32Exception(SerializationInfo, StreamingContext)

Inicializa uma nova instância da classe Win32Exception com o contexto e as informações de serialização especificados.Initializes a new instance of the Win32Exception class with the specified context and the serialization information.

Win32Exception(String, Exception)

Inicializa uma nova instância da classe Win32Exception com a descrição detalhada e a exceção especificadas.Initializes a new instance of the Win32Exception class with the specified detailed description and the specified exception.

Win32Exception()

Inicializa uma nova instância da classe Win32Exception com o último erro Win32 que ocorreu.Initializes a new instance of the Win32Exception class with the last Win32 error that occurred.

public:
 Win32Exception();
public Win32Exception ();
Public Sub New ()

Comentários

A descrição detalhada do erro será determinada pela mensagem de erro do Win32 associada ao erro.The detailed description of the error will be determined by the Win32 error message associated with the error.

Esse construtor usa o GetLastWin32Error método de Marshal para obter seu código de erro.This constructor uses the GetLastWin32Error method of Marshal to get its error code.

Aplica-se a

Win32Exception(Int32)

Inicializa uma nova instância da classe Win32Exception com o erro especificado.Initializes a new instance of the Win32Exception class with the specified error.

public:
 Win32Exception(int error);
public Win32Exception (int error);
new System.ComponentModel.Win32Exception : int -> System.ComponentModel.Win32Exception
Public Sub New (error As Integer)

Parâmetros

error
Int32

O código de erro do Win32 associado a essa exceção.The Win32 error code associated with this exception.

Comentários

A descrição detalhada do erro é determinada pela mensagem de erro do Win32 associada ao erro.The detailed description of the error is determined by the Win32 error message associated with the error.

Aplica-se a

Win32Exception(String)

Inicializa uma nova instância da classe Win32Exception com a descrição detalhada especificada.Initializes a new instance of the Win32Exception class with the specified detailed description.

public:
 Win32Exception(System::String ^ message);
public Win32Exception (string message);
public Win32Exception (string? message);
new System.ComponentModel.Win32Exception : string -> System.ComponentModel.Win32Exception
Public Sub New (message As String)

Parâmetros

message
String

Uma descrição detalhada do erro.A detailed description of the error.

Aplica-se a

Win32Exception(Int32, String)

Inicializa uma nova instância da classe Win32Exception com o erro especificado e a descrição detalhada especificada.Initializes a new instance of the Win32Exception class with the specified error and the specified detailed description.

public:
 Win32Exception(int error, System::String ^ message);
public Win32Exception (int error, string message);
public Win32Exception (int error, string? message);
new System.ComponentModel.Win32Exception : int * string -> System.ComponentModel.Win32Exception
Public Sub New (error As Integer, message As String)

Parâmetros

error
Int32

O código de erro do Win32 associado a essa exceção.The Win32 error code associated with this exception.

message
String

Uma descrição detalhada do erro.A detailed description of the error.

Comentários

A descrição detalhada do erro é determinada pela mensagem de erro do Win32 associada ao erro.The detailed description of the error is determined by the Win32 error message associated with the error.

Aplica-se a

Win32Exception(SerializationInfo, StreamingContext)

Inicializa uma nova instância da classe Win32Exception com o contexto e as informações de serialização especificados.Initializes a new instance of the Win32Exception class with the specified context and the serialization information.

protected:
 Win32Exception(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected Win32Exception (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ComponentModel.Win32Exception : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ComponentModel.Win32Exception
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parâmetros

info
SerializationInfo

A SerializationInfo associada a essa exceção.The SerializationInfo associated with this exception.

context
StreamingContext

Um StreamingContext que representa o contexto dessa exceção.A StreamingContext that represents the context of this exception.

Aplica-se a

Win32Exception(String, Exception)

Inicializa uma nova instância da classe Win32Exception com a descrição detalhada e a exceção especificadas.Initializes a new instance of the Win32Exception class with the specified detailed description and the specified exception.

public:
 Win32Exception(System::String ^ message, Exception ^ innerException);
public Win32Exception (string message, Exception innerException);
public Win32Exception (string? message, Exception? innerException);
new System.ComponentModel.Win32Exception : string * Exception -> System.ComponentModel.Win32Exception
Public Sub New (message As String, innerException As Exception)

Parâmetros

message
String

Uma descrição detalhada do erro.A detailed description of the error.

innerException
Exception

Uma referência à exceção interna que é a causa dessa exceção.A reference to the inner exception that is the cause of this exception.

Aplica-se a