262 references to CallingConvention
Microsoft.Build.Framework (1)
NativeMethods.cs (1)
1801[DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall,
Microsoft.CodeAnalysis (11)
PEWriter\Constants.cs (2)
17public const System.Runtime.InteropServices.CallingConvention CallingConvention_FastCall = (System.Runtime.InteropServices.CallingConvention)5;
Symbols\PlatformInvokeInformation.cs (9)
100public CallingConvention CallingConvention 107return CallingConvention.Winapi; 110return CallingConvention.Cdecl; 113return CallingConvention.StdCall; 116return CallingConvention.ThisCall; 168internal static MethodImportAttributes MakeFlags(bool exactSpelling, CharSet charSet, bool setLastError, CallingConvention callingConvention, bool? useBestFit, bool? throwOnUnmappable) 204case CallingConvention.Cdecl: 208case CallingConvention.StdCall: 212case CallingConvention.ThisCall:
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
865CallingConvention callingConvention = System.Runtime.InteropServices.CallingConvention.Winapi; 909callingConvention = namedArg.Value.DecodeValue<CallingConvention>(SpecialType.System_Enum);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenLocalFunctionTests.cs (2)
5780Assert.Equal(CallingConvention.Winapi, importData.CallingConvention); 5852Assert.Equal(CallingConvention.Cdecl, importData.CallingConvention);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (10)
Attributes\AttributeTests_WellKnownAttributes.cs (9)
270attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)CallingConvention.StdCall); 2482attrSym.VerifyNamedArgumentValue(0, "CallingConvention", TypedConstantKind.Enum, (int)CallingConvention.FastCall); 2770Assert.Equal(CallingConvention.Winapi, info.CallingConvention); 2858new { attr = MakeDllImport(cc: CallingConvention.Cdecl), expected = MethodImportAttributes.CallingConventionCDecl }, // M1 2859new { attr = MakeDllImport(cc: CallingConvention.FastCall), expected = MethodImportAttributes.CallingConventionFastCall }, // M2 2860new { attr = MakeDllImport(cc: CallingConvention.StdCall), expected = MethodImportAttributes.CallingConventionStdCall }, // M3 2861new { attr = MakeDllImport(cc: CallingConvention.ThisCall), expected = MethodImportAttributes.CallingConventionThisCall }, // M4 2862new { attr = MakeDllImport(cc: CallingConvention.Winapi), expected = MethodImportAttributes.CallingConventionWinApi }, // M5 2940CallingConvention? cc = null,
PartialEventsAndConstructorsTests.cs (1)
1728Assert.Equal(CallingConvention.Winapi, importData.CallingConvention);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
282Assert.Equal(CallingConvention.Cdecl, dllImport.CallingConvention);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
6207Assert.Equal(CallingConvention.Cdecl, importData.CallingConvention);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\ExtendedPartialMethodsTests.cs (1)
1174Assert.Equal(CallingConvention.Winapi, importData.CallingConvention);
Symbols\PartialPropertiesTests.cs (1)
802Assert.Equal(CallingConvention.Winapi, importData.CallingConvention);
Microsoft.CodeAnalysis.UnitTests (3)
MetadataReferences\FusionAssemblyIdentityComparer.cs (1)
97[DllImport("clr", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, PreserveSig = true)]
MetadataReferences\FusionAssemblyPortabilityPolicy.cs (2)
61[DllImport("clr", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, PreserveSig = false)] 64[DllImport("clr", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, PreserveSig = true)]
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Source\SourceMethodSymbol.vb (3)
1682Dim callingConvention As System.Runtime.InteropServices.CallingConvention = System.Runtime.InteropServices.CallingConvention.Winapi 1711callingConvention = namedArg.Value.DecodeValue(Of System.Runtime.InteropServices.CallingConvention)(SpecialType.System_Enum)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (13)
Attributes\AttributeTests_WellKnownAttributes.vb (13)
218Assert.Equal(CallingConvention.StdCall, CType(attrSym.CommonConstructorArguments(0).Value, CallingConvention)) ' 3 1234Assert.Equal(CallingConvention.FastCall, CType(attrSym.CommonNamedArguments(0).Value.Value, CallingConvention)) 1580Assert.Equal(CallingConvention.Winapi, info.CallingConvention) 1616Assert.Equal(CallingConvention.Winapi, info.CallingConvention) 1626Assert.Equal(CallingConvention.Winapi, info.CallingConvention) 1879New With {.n = 1, .attr = MakeDllImport(cc:=CallingConvention.Cdecl), .expected = MethodImportAttributes.CallingConventionCDecl}, 1880New With {.n = 2, .attr = MakeDllImport(cc:=CallingConvention.FastCall), .expected = MethodImportAttributes.CallingConventionFastCall}, 1881New With {.n = 3, .attr = MakeDllImport(cc:=CallingConvention.StdCall), .expected = MethodImportAttributes.CallingConventionStdCall}, 1882New With {.n = 4, .attr = MakeDllImport(cc:=CallingConvention.ThisCall), .expected = MethodImportAttributes.CallingConventionThisCall}, 1883New With {.n = 5, .attr = MakeDllImport(cc:=CallingConvention.Winapi), .expected = MethodImportAttributes.CallingConventionWinApi}, 1950Private Function MakeDllImport(Optional cc As CallingConvention? = Nothing, Optional charSet As CharSet? = Nothing, Optional exactSpelling As Boolean? = Nothing, Optional preserveSig As Boolean? = Nothing, Optional setLastError As Boolean? = Nothing, Optional bestFitMapping As Boolean? = Nothing, Optional throwOnUnmappableChar As Boolean? = Nothing) As String
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\MonoMSBuildDiscovery.cs (2)
41[DllImport("libc", EntryPoint = "realpath", CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 45[DllImport("libc", EntryPoint = "free", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Rpc\Contracts\MonoMSBuildDiscovery.cs (2)
41[DllImport("libc", EntryPoint = "realpath", CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 45[DllImport("libc", EntryPoint = "free", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
Microsoft.Interop.LibraryImportGenerator (6)
Analyzers\ConvertToLibraryImportFixer.cs (6)
574CallingConvention callingConvention, 583if (callingConvention == CallingConvention.Winapi) 593CallingConvention.Cdecl => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly. 595CallingConvention.StdCall => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly. 597CallingConvention.ThisCall => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly. 599CallingConvention.FastCall => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly.
Microsoft.ML.LightGbm (22)
WrappedLightGbmInterface.cs (22)
40[DllImport(DllName, EntryPoint = "LGBM_AllocateArray", CallingConvention = CallingConvention.StdCall)] 46[DllImport(DllName, EntryPoint = "LGBM_CopyToArray", CallingConvention = CallingConvention.StdCall)] 54[DllImport(DllName, EntryPoint = "LGBM_FreeArray", CallingConvention = CallingConvention.StdCall)] 63[DllImport(DllName, EntryPoint = "LGBM_GetLastError", CallingConvention = CallingConvention.StdCall)] 84[DllImport(DllName, EntryPoint = "LGBM_DatasetCreateFromSampledColumn", CallingConvention = CallingConvention.StdCall)] 95[DllImport(DllName, EntryPoint = "LGBM_DatasetCreateByReference", CallingConvention = CallingConvention.StdCall)] 100[DllImport(DllName, EntryPoint = "LGBM_DatasetPushRows", CallingConvention = CallingConvention.StdCall)] 117[DllImport(DllName, EntryPoint = "LGBM_DatasetPushRowsByCSR", CallingConvention = CallingConvention.StdCall)] 144[DllImport(DllName, EntryPoint = "LGBM_DatasetFree", CallingConvention = CallingConvention.StdCall)] 147[DllImport(DllName, EntryPoint = "LGBM_DatasetSetField", CallingConvention = CallingConvention.StdCall)] 155[DllImport(DllName, EntryPoint = "LGBM_DatasetGetNumData", CallingConvention = CallingConvention.StdCall)] 158[DllImport(DllName, EntryPoint = "LGBM_DatasetGetNumFeature", CallingConvention = CallingConvention.StdCall)] 179[DllImport(DllName, EntryPoint = "LGBM_BoosterCreate", CallingConvention = CallingConvention.StdCall)] 184[DllImport(DllName, EntryPoint = "LGBM_BoosterFree", CallingConvention = CallingConvention.StdCall)] 187[DllImport(DllName, EntryPoint = "LGBM_BoosterAddValidData", CallingConvention = CallingConvention.StdCall)] 190[DllImport(DllName, EntryPoint = "LGBM_BoosterSaveModelToString", CallingConvention = CallingConvention.StdCall)] 203[DllImport(DllName, EntryPoint = "LGBM_BoosterUpdateOneIter", CallingConvention = CallingConvention.StdCall)] 206[DllImport(DllName, EntryPoint = "LGBM_BoosterGetEvalCounts", CallingConvention = CallingConvention.StdCall)] 209[DllImport(DllName, EntryPoint = "LGBM_BoosterGetEval", CallingConvention = CallingConvention.StdCall)] 216[DllImport(DllName, EntryPoint = "LGBM_BoosterPredictForMat", CallingConvention = CallingConvention.StdCall)] 223[DllImport(DllName, EntryPoint = "LGBM_NetworkInitWithFunctions", CallingConvention = CallingConvention.StdCall)] 226[DllImport(DllName, EntryPoint = "LGBM_NetworkFree", CallingConvention = CallingConvention.StdCall)]
Microsoft.ML.Mkl.Components (7)
OlsLinearRegression.cs (3)
552[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "LAPACKE_dpptrf"), SuppressUnmanagedCodeSecurity] 587[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "LAPACKE_dpptrs"), SuppressUnmanagedCodeSecurity] 634[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "LAPACKE_dpptri"), SuppressUnmanagedCodeSecurity]
SymSgdClassificationTrainer.cs (1)
932[DllImport(MklPath, EntryPoint = "DftiErrorMessage", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto), SuppressUnmanagedCodeSecurity]
VectorWhitening.cs (3)
532[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "cblas_sgemv"), SuppressUnmanagedCodeSecurity] 537[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "cblas_sgemm"), SuppressUnmanagedCodeSecurity] 542[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "LAPACKE_sgesvd"), SuppressUnmanagedCodeSecurity]
Microsoft.ML.TestFrameworkCommon (1)
Attributes\AttributeHelpers.cs (1)
40[DllImport("libc", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
Microsoft.ML.TimeSeries (11)
EigenUtils.cs (8)
474[DllImport(MklPath, EntryPoint = "LAPACKE_shseqr", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 479[DllImport(MklPath, EntryPoint = "LAPACKE_dhseqr", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 484[DllImport(MklPath, EntryPoint = "LAPACKE_ssytrd", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 489[DllImport(MklPath, EntryPoint = "LAPACKE_dsytrd", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 494[DllImport(MklPath, EntryPoint = "LAPACKE_ssteqr", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 499[DllImport(MklPath, EntryPoint = "LAPACKE_dsteqr", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 504[DllImport(MklPath, EntryPoint = "LAPACKE_sorgtr", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 508[DllImport(MklPath, EntryPoint = "LAPACKE_dorgtr", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
FftUtils.cs (3)
174[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "DftiCommitDescriptor"), SuppressUnmanagedCodeSecurity] 178[DllImport(MklPath, CallingConvention = CallingConvention.Cdecl, EntryPoint = "DftiFreeDescriptor"), SuppressUnmanagedCodeSecurity] 202[DllImport(MklPath, EntryPoint = "DftiErrorMessage", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto), SuppressUnmanagedCodeSecurity]
Microsoft.ML.Vision (5)
ImageClassificationTrainer.cs (5)
1524[DllImport("tensorflow", CallingConvention = CallingConvention.Cdecl)] 1527[DllImport("tensorflow", CallingConvention = CallingConvention.Cdecl)] 1530[DllImport("tensorflow", CallingConvention = CallingConvention.Cdecl)] 1536[UnmanagedFunctionPointer(CallingConvention.Cdecl)] 1580[DllImport("tensorflow", CallingConvention = CallingConvention.Cdecl)]
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
613[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.CallingConvention))]
netstandard (1)
netstandard.cs (1)
1605[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.CallingConvention))]
PresentationCore (39)
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\NativeMethods.cs (4)
18[DllImport(DllImport.ApiSetWinRTString, CallingConvention = CallingConvention.StdCall)] 23[DllImport(DllImport.ApiSetWinRTString, CallingConvention = CallingConvention.StdCall)] 26[DllImport(DllImport.ApiSetWinRT, CallingConvention = CallingConvention.StdCall)] 29[DllImport(DllImport.ApiSetWinRT, CallingConvention = CallingConvention.StdCall)]
MS\Win32\UnsafeNativeMethodsTablet.cs (14)
16[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 19[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 22[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 25[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 28[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 31[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 34[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 37[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 40[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 43[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 46[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode)] 49[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 52[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)] 55[DllImport(ExternDll.Mshwgst, CallingConvention = CallingConvention.Winapi)]
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (20)
126[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 130[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 134[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 138[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 142[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 146[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 150[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 154[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 158[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 162[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 166[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 170[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 174[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 178[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 182[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 186[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 190[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 194[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 198[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 202[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)]
System\Windows\Media\MediaContextNotificationWindow.cs (1)
198[UnmanagedFunctionPointer(CallingConvention.Winapi)]
PresentationFramework (27)
MS\Internal\WindowsRuntime\Generated\WinRT.cs (7)
58[DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] 63[DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] 69[DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] 72[DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] 76[DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] 87[UnmanagedFunctionPointer(CallingConvention.StdCall)] 92[UnmanagedFunctionPointer(CallingConvention.StdCall)]
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (20)
126[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 130[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 134[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 138[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 142[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 146[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 150[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 154[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 158[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 162[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 166[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 170[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 174[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 178[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 182[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 186[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 190[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 194[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 198[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 202[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)]
PresentationUI (1)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
201[DllImport("msdrm.dll", SetLastError = false, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
ReachFramework (1)
PrintSystemExceptions\InteropWin32ApiThunk.cs (1)
27CallingConvention = CallingConvention.Winapi)]
System.Private.CoreLib (37)
src\libraries\Common\src\Interop\Interop.HostPolicy.cs (2)
11[UnmanagedFunctionPointer(CallingConvention.Cdecl)] 15[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (1)
45public abstract void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (3)
100Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 107Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 114Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (4)
192CallingConvention nativeCallConv, CharSet nativeCharSet) 199CallingConvention nativeCallConv, CharSet nativeCharSet) 209CallingConvention nativeCallConv, CharSet nativeCharSet) 226CallingConvention nativeCallConv, CharSet nativeCharSet);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\DllImportAttribute.cs (1)
20public CallingConvention CallingConvention;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\UnmanagedFunctionPointerAttribute.cs (2)
9public UnmanagedFunctionPointerAttribute(CallingConvention callingConvention) 14public CallingConvention CallingConvention { get; }
src\System\Reflection\Emit\DynamicILGenerator.cs (2)
219public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes) 446CallingConvention unmanagedCallConv,
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
562public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes)
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (1)
777Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet)
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (6)
1121CallingConvention nativeCallConv, CharSet nativeCharSet) 1154case CallingConvention.Winapi: 1157case CallingConvention.Cdecl: 1160case CallingConvention.StdCall: 1163case CallingConvention.ThisCall: 1166case CallingConvention.FastCall:
src\System\Reflection\Emit\SignatureHelper.cs (7)
78internal static SignatureHelper GetMethodSigHelper(Module? mod, CallingConvention unmanagedCallConv, Type? returnType) 84if (unmanagedCallConv == CallingConvention.Cdecl) 88else if (unmanagedCallConv == CallingConvention.StdCall || unmanagedCallConv == CallingConvention.Winapi) 92else if (unmanagedCallConv == CallingConvention.ThisCall) 96else if (unmanagedCallConv == CallingConvention.FastCall) 118internal static SignatureHelper GetMethodSigHelper(CallingConvention unmanagedCallingConvention, Type? returnType)
src\System\Reflection\RuntimeCustomAttributeData.cs (7)
2202CallingConvention callingConvention = CallingConvention.Cdecl; 2206case PInvokeAttributes.CallConvWinapi: callingConvention = CallingConvention.Winapi; break; 2207case PInvokeAttributes.CallConvCdecl: callingConvention = CallingConvention.Cdecl; break; 2208case PInvokeAttributes.CallConvStdcall: callingConvention = CallingConvention.StdCall; break; 2209case PInvokeAttributes.CallConvThiscall: callingConvention = CallingConvention.ThisCall; break; 2210case PInvokeAttributes.CallConvFastcall: callingConvention = CallingConvention.FastCall; break;
System.Reflection.Emit (18)
System\Reflection\Emit\ILGeneratorImpl.cs (1)
715public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes)
System\Reflection\Emit\MethodBuilderImpl.cs (1)
78internal void CreateDllImportData(string dllName, string entryName, CallingConvention nativeCallConv, CharSet nativeCharSet)
System\Reflection\Emit\ModuleBuilderImpl.cs (8)
1290CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) 1372internal int GetSignatureToken(CallingConvention callingConvention, Type? returnType, Type[]? parameterTypes) => 1376private static SignatureCallingConvention GetSignatureConvention(CallingConvention callingConvention) => 1379CallingConvention.Winapi => SignatureCallingConvention.Default, // TODO: platform-specific 1380CallingConvention.Cdecl => SignatureCallingConvention.CDecl, 1381CallingConvention.StdCall => SignatureCallingConvention.StdCall, 1382CallingConvention.ThisCall => SignatureCallingConvention.ThisCall, 1383CallingConvention.FastCall => SignatureCallingConvention.FastCall,
System\Reflection\Emit\PseudoCustomAttributesData.cs (7)
50importAttributes |= MatchNativeCallingConvention((CallingConvention)value); 96internal static DllImportData Create(string moduleName, string entryName, CallingConvention nativeCallConv, CharSet nativeCharSet) 118private static MethodImportAttributes MatchNativeCallingConvention(CallingConvention nativeCallConv) => 121CallingConvention.Cdecl => MethodImportAttributes.CallingConventionCDecl, 122CallingConvention.FastCall => MethodImportAttributes.CallingConventionFastCall, 123CallingConvention.StdCall => MethodImportAttributes.CallingConventionStdCall, 124CallingConvention.ThisCall => MethodImportAttributes.CallingConventionThisCall,
System\Reflection\Emit\TypeBuilderImpl.cs (1)
369Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, CallingConvention nativeCallConv, CharSet nativeCharSet)
System.Reflection.MetadataLoadContext (6)
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (6)
131CallingConvention callConv = (a & MethodImportAttributes.CallingConventionMask) switch 133MethodImportAttributes.CallingConventionCDecl => CallingConvention.Cdecl, 134MethodImportAttributes.CallingConventionFastCall => CallingConvention.FastCall, 135MethodImportAttributes.CallingConventionStdCall => CallingConvention.StdCall, 136MethodImportAttributes.CallingConventionThisCall => CallingConvention.ThisCall, 137MethodImportAttributes.CallingConventionWinApi => CallingConvention.Winapi,
System.Runtime.InteropServices (1)
artifacts\obj\System.Runtime.InteropServices\Debug\net10.0\System.Runtime.InteropServices.Forwards.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.CallingConvention))]
UIAutomationTypes (24)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (4)
707[DllImport(ExternDll.Kernel32, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] 734[DllImport(ExternDll.Kernel32, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] 741[DllImport(ExternDll.Kernel32, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] 2747[DllImport(ExternDll.User32, CallingConvention = CallingConvention.Winapi)]
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (20)
126[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 130[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 134[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 138[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 142[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 146[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 150[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 154[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 158[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 162[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 166[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 170[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 174[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 178[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 182[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 186[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 190[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 194[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 198[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)] 202[DllImport(DllImport.PresentationNative, CallingConvention = CallingConvention.Cdecl)]