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 转换为的非托管类型。

继承
ExceptionAsHResultMarshaller<T>
属性

注解

COM 源生成器使用此类型对异常的 HResult 启用封送异常。

方法

ConvertToUnmanaged(Exception)

将异常对象封送为其转换为 T的值HResult

适用于