ExceptionAsHResultMarshaller<T> 類別

定義

將例外狀況物件封送處理為其轉換成 T的值HResult

generic <typename T>
 where T : value classpublic ref class ExceptionAsHResultMarshaller abstract sealed
[System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Exception), System.Runtime.InteropServices.Marshalling.MarshalMode.UnmanagedToManagedOut, typeof(System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<>))]
public static class ExceptionAsHResultMarshaller<T> where T : struct
[<System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.Exception), System.Runtime.InteropServices.Marshalling.MarshalMode.UnmanagedToManagedOut, typeof(System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<>))>]
type ExceptionAsHResultMarshaller<'T (requires 'T : struct)> = class
Public Class ExceptionAsHResultMarshaller(Of T)

類型參數

T

要轉換成 HResult 的 Unmanaged 型別。

繼承
ExceptionAsHResultMarshaller<T>
屬性

備註

COM 來源產生器會使用此類型來啟用例外狀況的 HResult 封送處理例外狀況。

方法

ConvertToUnmanaged(Exception)

將例外狀況物件封送處理為其轉換成 T的值HResult

適用於