12 references to System_Runtime_InteropServices_Marshal
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
29
INamedTypeSymbol? marshalType = context.Compilation.GetBestTypeByMetadataName(TypeNames.
System_Runtime_InteropServices_Marshal
);
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
45
writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.ThrowExceptionForHR({managedIdentifier}, new({interfaceId}), (nint){VirtualMethodPointerStubGenerator.NativeThisParameterIdentifier});");
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
426
TypeNames.
System_Runtime_InteropServices_Marshal
)),
Microsoft.Interop.SourceGeneration (9)
Marshalling\DelegateMarshaller.cs (2)
35
writer.WriteLine($"{nativeIdentifier} = {managedIdentifier} != null ? {TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.GetFunctionPointerForDelegate({managedIdentifier}) : default;");
42
writer.WriteLine($"{managedIdentifier} = {nativeIdentifier} != default ? {TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.GetDelegateForFunctionPointer<{info.ManagedType.FullTypeName}>({nativeIdentifier}) : null;");
Marshalling\IidParameterIndexMarshallerResolver.cs (3)
51
writer.WriteLine($"int {queryInterfaceHResultIdentifier} = {TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.QueryInterface(({TypeNames.GlobalAlias}{TypeNames.System_IntPtr}){unknownIdentifier}, in {iidExpression}, out {queriedInterfaceIdentifier});");
59
writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.Release({queriedInterfaceIdentifier});");
63
writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.ThrowExceptionForHR({queryInterfaceHResultIdentifier});");
Marshalling\MarshallerHelpers.cs (3)
37
FormattableString.Invariant($"{TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.SetLastSystemError({errorCode});");
43
$"{lastErrorIdentifier} = {TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.GetLastSystemError();";
50
$"{TypeNames.GlobalAlias}{TypeNames.
System_Runtime_InteropServices_Marshal
}.SetLastPInvokeError({lastErrorIdentifier});";
TypeNames.cs (1)
79
return options.UseMarshalType ?
System_Runtime_InteropServices_Marshal
: System_Runtime_InteropServices_MarshalEx;