ExceptionAsHResultMarshaller<T> Klass
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Konverterar ett undantagsobjekt till värdet för dess HResult konverterade till T.
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)
Typparametrar
- T
Den ohanterade typen som HResult konverteras till.
- Arv
-
ExceptionAsHResultMarshaller<T>
- Attribut
Kommentarer
Den här typen används av COM-källgeneratorn för att aktivera undantag för marshalling till HResult för undantaget.
Metoder
| Name | Description |
|---|---|
| ConvertToUnmanaged(Exception) |
Konverterar ett undantagsobjekt till värdet för dess HResult konverterade till |