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