Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ComActivationContext.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Diagnostics.CodeAnalysis
;
3
using
System.Runtime.InteropServices
;
4
5
namespace
Internal.Runtime.InteropServices
;
6
7
public
struct
ComActivationContext
8
{
9
public
Guid
ClassId
;
10
11
public
Guid
InterfaceId
;
12
13
public
string
AssemblyPath
;
14
15
public
string
AssemblyName
;
16
17
public
string
TypeName
;
18
19
[RequiresUnreferencedCode(
"Built-in COM support is not trim compatible"
, Url =
"https://aka.ms/dotnet-illink/com"
)]
20
[CLSCompliant(
false
)]
21
public
unsafe
static
ComActivationContext
Create
(ref
ComActivationContextInternal
cxtInt)
22
{
23
if
(!
Marshal
.
IsBuiltInComSupported
)
24
{
25
throw
new
NotSupportedException
(
SR
.
NotSupported_COM
);
26
}
27
ComActivationContext
result =
default
(
ComActivationContext
);
28
result.ClassId = cxtInt.
ClassId
;
29
result.InterfaceId = cxtInt.InterfaceId;
30
result.AssemblyPath =
Marshal
.
PtrToStringUni
(
new
IntPtr
(cxtInt.AssemblyPathBuffer));
31
result.AssemblyName =
Marshal
.
PtrToStringUni
(
new
IntPtr
(cxtInt.AssemblyNameBuffer));
32
result.TypeName =
Marshal
.
PtrToStringUni
(
new
IntPtr
(cxtInt.TypeNameBuffer));
33
return
result;
34
}
35
}
System.NotSupportedException
Definition
NotSupportedException.cs:9
System.Runtime.InteropServices.Marshal.PtrToStringUni
static unsafe? string PtrToStringUni(IntPtr ptr)
Definition
Marshal.cs:652
System.Runtime.InteropServices.Marshal.IsBuiltInComSupported
static bool IsBuiltInComSupported
Definition
Marshal.cs:21
System.Runtime.InteropServices.Marshal
Definition
Marshal.cs:14
System.SR.NotSupported_COM
static string NotSupported_COM
Definition
SR.cs:2190
System.SR
Definition
SR.cs:7
Internal.Runtime.InteropServices
Definition
ComActivationContext.cs:5
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System
Definition
BlockingCollection.cs:8
Internal.Runtime.InteropServices.ComActivationContextInternal
Definition
ComActivationContextInternal.cs:7
Internal.Runtime.InteropServices.ComActivationContext.Create
static unsafe ComActivationContext Create(ref ComActivationContextInternal cxtInt)
Definition
ComActivationContext.cs:21
Internal.Runtime.InteropServices.ComActivationContext.ClassId
Guid ClassId
Definition
ComActivationContext.cs:9
Internal.Runtime.InteropServices.ComActivationContext.InterfaceId
Guid InterfaceId
Definition
ComActivationContext.cs:11
Internal.Runtime.InteropServices.ComActivationContext.AssemblyPath
string AssemblyPath
Definition
ComActivationContext.cs:13
Internal.Runtime.InteropServices.ComActivationContext.AssemblyName
string AssemblyName
Definition
ComActivationContext.cs:15
Internal.Runtime.InteropServices.ComActivationContext.TypeName
string TypeName
Definition
ComActivationContext.cs:17
Internal.Runtime.InteropServices.ComActivationContext
Definition
ComActivationContext.cs:8
System.Guid
Definition
Guid.cs:15
System.IntPtr
Definition
IntPtr.cs:14
source
System.Private.CoreLib
Internal.Runtime.InteropServices
ComActivationContext.cs
Generated by
1.10.0