418 writes to SetLastError
aspire (1)
Processes\WindowsProcessInterop.cs (1)
155[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
csc (5)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (5)
73[DllImport("kernel32.dll", SetLastError = true)] 80[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 97[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 172[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 183[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
datacollector (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
datacollector.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
dotnet-aot (1)
parent\dotnet\Telemetry\ExternalTelemetryProperties.cs (1)
41[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = false)]
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.AspNetCore.Server.HttpSys (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvoke.KERNEL32.dll.g.cs (3)
37 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 82 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 109 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
Microsoft.AspNetCore.Server.IIS (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvoke.KERNEL32.dll.g.cs (1)
37 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
Microsoft.Build.Framework (4)
NativeMethods.cs (4)
1297[DllImport("libc", SetLastError = true)] 1301[DllImport("libc", SetLastError = true)] 1304[DllImport("libc", SetLastError = true)] 1308[DllImport("libc", EntryPoint = "realpath", SetLastError = true)]
Microsoft.Build.Tasks.CodeAnalysis (5)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (5)
73[DllImport("kernel32.dll", SetLastError = true)] 80[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 97[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 172[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 183[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
Microsoft.Build.Tasks.Core (13)
ManifestUtil\mansign2.cs (12)
122[DllImport(KERNEL32, CharSet = CharSet.Auto, SetLastError = true)] 126[DllImport(KERNEL32, CharSet = CharSet.Auto, SetLastError = true)] 134[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 141[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 149[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 154[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 159[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 165[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 172[DllImport(MSCORWKS, CharSet = CharSet.Auto, SetLastError = true)] 210[DllImport(CRYPT32, CallingConvention = CallingConvention.Winapi, SetLastError = true)] 226[DllImport(CRYPT32, CallingConvention = CallingConvention.Winapi, SetLastError = true)] 230[DllImport(CRYPT32, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
NativeMethods.cs (1)
71[DllImport("libc", SetLastError = true)]
Microsoft.CodeAnalysis (4)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
505[DllImport("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 536[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 547[DllImport("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.CodeAnalysis.BuildClient.Package (5)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (5)
73[DllImport("kernel32.dll", SetLastError = true)] 80[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 97[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 172[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 183[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.CodeAnalysis.Workspaces (4)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
505[DllImport("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 536[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 547[DllImport("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
Microsoft.Diagnostics.NETCore.Client (1)
NativeMethods.cs (1)
12[DllImport("kernel32.dll", SetLastError = true)]
Microsoft.DotNet.HotReload.Watch (1)
Utilities\ProcessUtilities.cs (1)
23[DllImport("kernel32.dll", SetLastError = true)]
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
DiskBased\PathValidationTests.cs (1)
488[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
Microsoft.Extensions.Diagnostics.ResourceMonitoring (7)
Windows\Interop\JobObjectInfo.cs (5)
329[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] 345[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] 363[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] 376[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] 390[DllImport("kernel32.dll", SetLastError = true)]
Windows\Network\WindowsTcpStateInfo.cs (2)
211[DllImport("Iphlpapi.dll", SetLastError = true)] 222[DllImport("Iphlpapi.dll", SetLastError = true)]
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\StartupHook.cs (1)
125[DllImport("kernel32.dll", SetLastError = true)]
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
349[DllImport("libc", SetLastError = true)]
Microsoft.NET.Sdk.Razor.Tasks (3)
parent\Tool\ServerProtocol\NativeMethods.cs (3)
58[DllImport("kernel32.dll", SetLastError = true)] 65[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 82[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
Microsoft.Private.Windows.Core (36)
Generated\361d1da7f942c932\Windows.Win32.PInvokeCore.KERNEL32.dll.g.cs (10)
37 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 53 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 93 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 109 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 131 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 147 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 163 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 179 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 220 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 287 [DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvokeCore.GDI32.dll.g.cs (2)
47 [DllImport("GDI32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 229 [DllImport("GDI32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.PInvokeCore.USER32.dll.g.cs (18)
109 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 154 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 200 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 324 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 353 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 388 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetClipboardFormatNameW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 455 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 484 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 600 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 635 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetWindowTextW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 652 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetWindowTextLengthW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 708 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 741 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "LoadIconW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 891 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "PostMessageW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 919 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "RegisterClipboardFormatW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 961 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SendMessageW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 998 [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SystemParametersInfoW", SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)] 1023 [DllImport("USER32.dll", ExactSpelling = true, SetLastError = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
Windows\Win32\PInvokeCore.GetClassLong.cs (2)
10[DllImport(Libraries.User32, SetLastError = true)] 14[DllImport(Libraries.User32, SetLastError = true)]
Windows\Win32\PInvokeCore.GetWindowLong.cs (2)
8[DllImport(Libraries.User32, SetLastError = true)] 11[DllImport(Libraries.User32, SetLastError = true)]
Windows\Win32\PInvokeCore.SetWindowLong.cs (2)
8[DllImport(Libraries.User32, SetLastError = true)] 11[DllImport(Libraries.User32, SetLastError = true)]
Microsoft.TestPlatform.CrossPlatEngine (1)
PostProcessing\ArtifactProcessingManager.cs (1)
282[DllImport("libc", EntryPoint = "chmod", SetLastError = true)]
Microsoft.TestPlatform.Extensions.BlameDataCollector (6)
MiniDumpWriteDump.cs (1)
72[DllImport("Dbghelp.dll", SetLastError = true)]
ProcessCodeMethods.cs (1)
210[DllImport("ntdll.dll", SetLastError = true)]
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
Win32NamedEvent.cs (2)
37[DllImport("kernel32.dll", SetLastError = true)] 44[DllImport("Kernel32.dll", SetLastError = true)]
Microsoft.TestPlatform.PlatformAbstractions (2)
common\NativeMethods.cs (2)
14[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 21[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
Microsoft.VisualBasic.Forms (4)
Microsoft\VisualBasic\Helpers\NativeMethods.vb (2)
55<DllImport("user32", CharSet:=CharSet.Auto, PreserveSig:=True, SetLastError:=True)> 97<DllImport("Kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)>
Microsoft\VisualBasic\Helpers\UnsafeNativeMethods.vb (2)
19<DllImport("Kernel32.dll", CharSet:=CharSet.Auto, BestFitMapping:=False, SetLastError:=True)> 44<DllImport("kernel32", ExactSpelling:=True, SetLastError:=True)>
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Navigation\NativeMethods.cs (1)
555[DllImport("kernel32.dll", SetLastError = true)]
NuGet.Common (1)
PathUtil\NuGetEnvironment.cs (1)
184[DllImport("libc", SetLastError = true, CharSet = CharSet.Ansi)]
NuGet.Configuration (1)
Utility\FileSystemUtility.cs (1)
52[DllImport("libc", SetLastError = true, CharSet = CharSet.Ansi)]
NuGet.Packaging (21)
Signing\Cms\NativeMethods.cs (14)
18[DllImport("crypt32.dll", SetLastError = true)] 29[DllImport("crypt32.dll", SetLastError = true)] 39[DllImport("crypt32.dll", SetLastError = true)] 47[DllImport("crypt32.dll", SetLastError = true)] 51[DllImport("crypt32.dll", SetLastError = true)] 59[DllImport("crypt32.dll", SetLastError = true)] 67[DllImport("crypt32.dll", SetLastError = true)] 75[DllImport("crypt32.dll", SetLastError = true)] 86[DllImport("crypt32.dll", SetLastError = true)] 94[DllImport("crypt32.dll", SetLastError = true)] 104[DllImport("advapi32.dll", SetLastError = true)] 107[DllImport("crypt32.dll", SetLastError = true)] 110[DllImport("crypt32.dll", SetLastError = true)] 113[DllImport("crypt32.dll", SetLastError = true)]
Signing\Timestamp\Rfc3161TimestampWin32.cs (7)
87[DllImport("crypt32.dll", CallingConvention = CallingConvention.Winapi, SetLastError = true)] 101[DllImport("crypt32.dll", CallingConvention = CallingConvention.Winapi, SetLastError = true)] 139[DllImport("crypt32.dll", SetLastError = true, BestFitMapping = false)] 150[DllImport("crypt32.dll", SetLastError = true, BestFitMapping = false)] 162[DllImport("crypt32.dll", CallingConvention = CallingConvention.Winapi, SetLastError = true)] 166[DllImport("crypt32.dll", CallingConvention = CallingConvention.Winapi, SetLastError = true)] 173[DllImport("kernel32.dll", SetLastError = true)]
PresentationCore (21)
MS\Win32\UnsafeNativeMethodsPointer.cs (17)
521[DllImport(DllImport.User32, EntryPoint = "GetPointerDevices", SetLastError = true)] 527[DllImport(DllImport.User32, EntryPoint = "GetPointerDeviceCursors", SetLastError = true)] 533[DllImport(DllImport.User32, EntryPoint = "GetPointerInfo", SetLastError = true)] 539[DllImport(DllImport.User32, EntryPoint = "GetPointerInfoHistory", SetLastError = true)] 545[DllImport(DllImport.User32, EntryPoint = "GetPointerDeviceProperties", SetLastError = true)] 551[DllImport(DllImport.User32, EntryPoint = "GetPointerDeviceRects", SetLastError = true)] 557[DllImport(DllImport.User32, EntryPoint = "GetPointerCursorId", SetLastError = true)] 563[DllImport(DllImport.User32, EntryPoint = "GetPointerPenInfo", SetLastError = true)] 569[DllImport(DllImport.User32, EntryPoint = "GetPointerTouchInfo", SetLastError = true)] 575[DllImport(DllImport.User32, EntryPoint = "GetRawPointerDeviceData", SetLastError = true)] 593[DllImport(DllImport.NInput, EntryPoint = "CreateInteractionContext", SetLastError = true)] 600[DllImport(DllImport.NInput, EntryPoint = "DestroyInteractionContext", SetLastError = true)] 609[DllImport(DllImport.NInput, EntryPoint = "SetInteractionConfigurationInteractionContext", SetLastError = true)] 618[DllImport(DllImport.NInput, EntryPoint = "RegisterOutputCallbackInteractionContext", SetLastError = true, PreserveSig = false)] 627[DllImport(DllImport.NInput, EntryPoint = "SetPropertyInteractionContext", SetLastError = true)] 636[DllImport(DllImport.NInput, EntryPoint = "BufferPointerPacketsInteractionContext", SetLastError = true, PreserveSig = false)] 643[DllImport(DllImport.NInput, EntryPoint = "ProcessBufferedPacketsInteractionContext", SetLastError = true, PreserveSig = false)]
System\Windows\Media\UnsafeNativeMethodsMilCoreApi.cs (4)
1063[DllImport(DllImport.Mscms, EntryPoint = "DeleteColorTransform", SetLastError = true)] 1072[DllImport(DllImport.Mscms, EntryPoint = "CloseColorProfile", SetLastError = true)] 1075[DllImport(DllImport.Mscms, EntryPoint = "GetColorProfileHeader", SetLastError = true)] 1084[DllImport(DllImport.Mscms, EntryPoint = "GetColorProfileFromHandle", SetLastError = true)]
PresentationFramework (49)
MS\Internal\WindowsRuntime\Generated\WinRT.cs (3)
35[DllImport("kernel32.dll", SetLastError = true)] 39[DllImport("kernel32.dll", SetLastError = true)] 52[DllImport("kernel32.dll", SetLastError = true)]
System\Windows\Standard\NativeMethods.cs (46)
1381[DllImport("gdi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 2278[DllImport("user32.dll", EntryPoint = "AdjustWindowRectEx", SetLastError = true)] 2293[DllImport("user32.dll", EntryPoint = "ChangeWindowMessageFilter", SetLastError = true)] 2297[DllImport("user32.dll", EntryPoint = "ChangeWindowMessageFilterEx", SetLastError = true)] 2377[DllImport("gdi32.dll", EntryPoint = "CreateDIBSection", SetLastError = true)] 2380[DllImport("gdi32.dll", EntryPoint = "CreateDIBSection", SetLastError = true)] 2404[DllImport("gdi32.dll", EntryPoint = "CreateRoundRectRgn", SetLastError = true)] 2417[DllImport("gdi32.dll", EntryPoint = "CreateRectRgn", SetLastError = true)] 2430[DllImport("gdi32.dll", EntryPoint = "CreateRectRgnIndirect", SetLastError = true)] 2446[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = "CreateWindowExW")] 2495[DllImport("user32.dll", SetLastError = true)] 2506[DllImport("dwmapi.dll", EntryPoint = "DwmExtendFrameIntoClientArea", PreserveSig = true, SetLastError = true)] 2616[DllImport("user32.dll", EntryPoint = "RemoveMenu", SetLastError = true)] 2628[DllImport("user32.dll", EntryPoint = "DrawMenuBar", SetLastError = true)] 2646[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 2650[DllImport("kernel32.dll", SetLastError = true)] 2654[DllImport("user32.dll", EntryPoint = "GetClientRect", SetLastError = true)] 2702[DllImport("kernel32.dll", EntryPoint = "GetModuleFileName", CharSet = CharSet.Unicode, SetLastError = true)] 2729[DllImport("kernel32.dll", EntryPoint = "GetModuleHandleW", CharSet = CharSet.Unicode, SetLastError = true)] 2742[DllImport("user32.dll", EntryPoint = "GetMonitorInfo", SetLastError = true)] 2756[DllImport("gdi32.dll", EntryPoint = "GetStockObject", SetLastError = true)] 2816[DllImport("user32.dll", SetLastError = true)] 2830[DllImport("user32.dll", EntryPoint = "GetWindowRect", SetLastError = true)] 2869[DllImport("kernel32.dll", EntryPoint = "LocalFree", SetLastError = true)] 2875[DllImport("user32.dll", EntryPoint = "PostMessage", SetLastError = true)] 2887[DllImport("user32.dll", SetLastError = true, EntryPoint = "RegisterClassExW")] 2904[DllImport("user32.dll", EntryPoint = "RegisterWindowMessage", SetLastError = true, CharSet = CharSet.Unicode)] 2917[DllImport("user32.dll", EntryPoint = "SetActiveWindow", SetLastError = true)] 2942[DllImport("user32.dll", EntryPoint = "SetClassLong", SetLastError = true)] 2945[DllImport("user32.dll", EntryPoint = "SetClassLongPtr", SetLastError = true)] 2948[DllImport("kernel32.dll", SetLastError = true)] 2951[DllImport("kernel32.dll", SetLastError = true, EntryPoint = "SetProcessWorkingSetSize")] 2973[DllImport("user32.dll", EntryPoint = "SetWindowRgn", SetLastError = true)] 2985[DllImport("user32.dll", EntryPoint = "SetWindowPos", SetLastError = true)] 3000[DllImport("shell32.dll", SetLastError = false)] 3007[DllImport("user32.dll", EntryPoint = "SystemParametersInfoW", SetLastError = true)] 3012[DllImport("user32.dll", EntryPoint = "SystemParametersInfoW", SetLastError = true, CharSet = CharSet.Unicode)] 3017[DllImport("user32.dll", EntryPoint = "SystemParametersInfoW", SetLastError = true, CharSet = CharSet.Unicode)] 3060[DllImport("gdi32.dll", EntryPoint = "SelectObject", SetLastError = true)] 3073[DllImport("gdi32.dll", EntryPoint = "SelectObject", SetLastError = true)] 3086[DllImport("user32.dll", SetLastError = true)] 3090[DllImport("user32.dll", SetLastError = true)] 3093[DllImport("user32.dll", EntryPoint = "UnregisterClass", SetLastError = true)] 3097[DllImport("user32.dll", EntryPoint = "UnregisterClass", CharSet = CharSet.Unicode, SetLastError = true)] 3117[DllImport("user32.dll", SetLastError = true, EntryPoint = "UpdateLayeredWindow")] 3130[DllImport("user32.dll", SetLastError = true, EntryPoint = "UpdateLayeredWindow")]
PresentationUI (1)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
201[DllImport("msdrm.dll", SetLastError = false, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
ReachFramework (12)
MS\Internal\Printing\Configuration\UnsafeNativeMethods.cs (11)
242[DllImport(ExternDll.Winspool, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 250[DllImport(ExternDll.Winspool, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 258[DllImport(ExternDll.Winspool, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 266[DllImport(ExternDll.Winspool, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 275[DllImport(ExternDll.Winspool, ExactSpelling = true, SetLastError = true)] 278[DllImport(ExternDll.Gdi32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 281[DllImport(ExternDll.Gdi32, ExactSpelling = true, SetLastError = true)] 284[DllImport(ExternDll.Gdi32, ExactSpelling = true, SetLastError = true)] 287[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 290[DllImport(ExternDll.Kernel32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 293[DllImport(ExternDll.Kernel32, ExactSpelling = true, SetLastError = true)]
PrintSystemExceptions\InteropWin32ApiThunk.cs (1)
26SetLastError=true,
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\NoMessagePumpSyncContext.cs (1)
77[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
rzc (3)
ServerProtocol\NativeMethods.cs (3)
58[DllImport("kernel32.dll", SetLastError = true)] 65[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 82[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
System.DirectoryServices (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (1)
615[global::System.Runtime.InteropServices.DllImportAttribute("advapi32.dll", EntryPoint = "LsaNtStatusToWinError", ExactSpelling = true, SetLastError = false)]
System.DirectoryServices.AccountManagement (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (1)
493[global::System.Runtime.InteropServices.DllImportAttribute("advapi32.dll", EntryPoint = "LsaNtStatusToWinError", ExactSpelling = true, SetLastError = false)]
System.Private.CoreLib (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (2)
1155[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "FindNLSStringEx", ExactSpelling = true, SetLastError = false)] 1197[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "FindStringOrdinal", ExactSpelling = true, SetLastError = false)]
System.Private.Windows.Core (6)
Windows\Win32\PInvokeCore.GetClassLong.cs (2)
10[DllImport(Libraries.User32, SetLastError = true)] 14[DllImport(Libraries.User32, SetLastError = true)]
Windows\Win32\PInvokeCore.GetWindowLong.cs (2)
8[DllImport(Libraries.User32, SetLastError = true)] 11[DllImport(Libraries.User32, SetLastError = true)]
Windows\Win32\PInvokeCore.SetWindowLong.cs (2)
8[DllImport(Libraries.User32, SetLastError = true)] 11[DllImport(Libraries.User32, SetLastError = true)]
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (1)
147SetLastError = (a & MethodImportAttributes.SetLastError) != 0,
System.Security.Principal.Windows (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (1)
1014[global::System.Runtime.InteropServices.DllImportAttribute("advapi32.dll", EntryPoint = "LsaNtStatusToWinError", ExactSpelling = true, SetLastError = false)]
System.Windows.Controls.Ribbon (3)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (3)
320[DllImport("user32.dll", EntryPoint = "GetMonitorInfo", CharSet = CharSet.Auto, SetLastError = true)] 347[DllImport("gdi32.dll", SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 350[DllImport("user32.dll", SetLastError = true, ExactSpelling = true, EntryPoint = "GetDC", CharSet = CharSet.Auto)]
testhost (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
testhost.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
testhost.x86 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
UIAutomationClient (31)
MS\Win32\SafeNativeMethods.cs (8)
69[DllImport("user32.dll", SetLastError = true)] 136[DllImport("user32.dll", ExactSpelling = true, SetLastError = true)] 139[DllImport("user32.dll", SetLastError = true)] 154[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 157[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 176[DllImport("gdi32.dll", CharSet = CharSet.Auto, SetLastError = true)] 191[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] 198[DllImport("Psapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
MS\Win32\UnsafeNativeMethods.cs (16)
24[DllImport("kernel32.dll", SetLastError = true)] 36[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] 92[DllImport("user32.dll", SetLastError = true)] 106[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 109[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 145[DllImport("oleacc.dll", SetLastError = true)] 187[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 191[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 197[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 217[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 233[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 300[DllImport("user32.dll", SetLastError = true)] 325[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 328[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 335[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 360[DllImport("gdi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (7)
40[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongWrapper", CharSet=CharSet.Auto, SetLastError=true)] 43[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongPtrWrapper", CharSet=CharSet.Auto, SetLastError=true)] 46[DllImport(PresentationNativeDll, EntryPoint="GlobalDeleteAtomWrapper", ExactSpelling = true, SetLastError = true)] 51[DllImport(PresentationNativeDll, EntryPoint="GetMenuBarInfoWrapper", SetLastError = true)] 54[DllImport(PresentationNativeDll, EntryPoint="GetWindowWrapper", ExactSpelling = true, SetLastError = true)] 57[DllImport(PresentationNativeDll, EntryPoint="MapWindowPointsWrapper", SetLastError = true, ExactSpelling=true, CharSet=CharSet.Auto)] 60[DllImport(PresentationNativeDll, EntryPoint="MapWindowPointsWrapper", SetLastError = true, ExactSpelling=true, CharSet=CharSet.Auto)]
UIAutomationClientSideProviders (55)
MS\Win32\SafeNativeMethods.cs (3)
18[DllImport(ExternDll.User32, SetLastError = true)] 26[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 28[DllImport(ExternDll.User32, SetLastError = true)]
MS\Win32\UnsafeNativeMethods.cs (41)
19[DllImport(ExternDll.Gdi32, SetLastError = true)] 26[DllImport(ExternDll.Kernel32, SetLastError = true)] 28[DllImport(ExternDll.Kernel32, SetLastError = true)] 33[DllImport(ExternDll.Kernel32, SetLastError = true)] 45[DllImport(ExternDll.Kernel32, SetLastError = true)] 47[DllImport(ExternDll.Kernel32, SetLastError = true)] 49[DllImport(ExternDll.Kernel32, SetLastError = true)] 51[DllImport(ExternDll.Kernel32, SetLastError = true)] 61[DllImport(ExternDll.Kernel32, SetLastError = true)] 63[DllImport(ExternDll.Kernel32, SetLastError = true)] 65[DllImport(ExternDll.Kernel32, SetLastError = true)] 82[DllImport("oleacc.dll", SetLastError=true)] 120[DllImport(ExternDll.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)] 126[DllImport(ExternDll.User32, ExactSpelling = true, SetLastError = true)] 142[DllImport(ExternDll.User32, SetLastError = true)] 146[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 148[DllImport(ExternDll.User32, SetLastError = true)] 158[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 162[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 164[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 166[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 168[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 170[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 172[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 190[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 192[DllImport(ExternDll.User32, SetLastError = true)] 196[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 225[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 231[DllImport(ExternDll.User32, CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)] 233[DllImport(ExternDll.User32, CharSet = CharSet.Auto, ExactSpelling = true, SetLastError = true)] 245[DllImport(ExternDll.User32, SetLastError = true)] 247[DllImport(ExternDll.User32, SetLastError = true)] 253[DllImport(ExternDll.User32, ExactSpelling = true, SetLastError = true)] 259[DllImport(ExternDll.User32, ExactSpelling = true, SetLastError = true)] 261[DllImport(ExternDll.User32, SetLastError = true)] 263[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] 265[DllImport(ExternDll.User32, ExactSpelling = true, SetLastError = true)] 271[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 276[DllImport(ExternDll.User32, ExactSpelling = true, SetLastError = true)] 362[DllImport(ExternDll.User32, CharSet = CharSet.Unicode, SetLastError = true)] 426[DllImport(ExternDll.User32, ExactSpelling = true, SetLastError = true)]
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (11)
40[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongWrapper", CharSet=CharSet.Auto, SetLastError=true)] 43[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongPtrWrapper", CharSet=CharSet.Auto, SetLastError=true)] 46[DllImport(PresentationNativeDll, EntryPoint="GlobalDeleteAtomWrapper", ExactSpelling = true, SetLastError = true)] 68[DllImport(PresentationNativeDll, EntryPoint="FindWindowExWrapper", CharSet = CharSet.Unicode, SetLastError = true)] 71[DllImport(PresentationNativeDll, EntryPoint="GetMenuBarInfoWrapper", SetLastError = true)] 74[DllImport(PresentationNativeDll, EntryPoint="GetTextExtentPoint32Wrapper", SetLastError = true)] 77[DllImport(PresentationNativeDll, EntryPoint="GetWindowWrapper", ExactSpelling = true, SetLastError = true)] 80[DllImport(PresentationNativeDll, EntryPoint = "GetWindowTextWrapper", CharSet=CharSet.Auto, BestFitMapping = false, SetLastError = true)] 83[DllImport(PresentationNativeDll, EntryPoint="MapWindowPointsWrapper", ExactSpelling = true, SetLastError = true)] 86[DllImport(PresentationNativeDll, EntryPoint="MapWindowPointsWrapper", ExactSpelling = true, SetLastError = true)] 89[DllImport(PresentationNativeDll, EntryPoint="SetScrollPosWrapper", SetLastError = true)]
UIAutomationTypes (63)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (1)
194[DllImport(ExternDll.Gdi32, ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)]
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (16)
95[DllImport(PresentationNativeDll, EntryPoint="EnableWindowWrapper", SetLastError = true, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)] 101[DllImport(PresentationNativeDll, EntryPoint="GetKeyboardLayoutListWrapper", SetLastError = true, ExactSpelling=true, CharSet=CharSet.Auto)] 104[DllImport(PresentationNativeDll, EntryPoint="GetParentWrapper", SetLastError = true)] 107[DllImport(PresentationNativeDll, EntryPoint="GetWindowWrapper", ExactSpelling = true, SetLastError = true)] 110[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongWrapper", CharSet=CharSet.Auto, SetLastError=true)] 113[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongWrapper", CharSet=CharSet.Auto, SetLastError=true)] 116[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongWrapper", CharSet=CharSet.Auto, SetLastError=true)] 119[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongPtrWrapper", CharSet=CharSet.Auto, SetLastError=true)] 122[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongPtrWrapper", CharSet=CharSet.Auto, SetLastError=true)] 125[DllImport(PresentationNativeDll, EntryPoint="GetWindowLongPtrWrapper", CharSet=CharSet.Auto, SetLastError=true)] 128[DllImport(PresentationNativeDll, EntryPoint = "GetWindowTextWrapper", CharSet=CharSet.Auto, BestFitMapping = false, SetLastError = true)] 131[DllImport(PresentationNativeDll, EntryPoint = "GetWindowTextLengthWrapper", CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] 134[DllImport(PresentationNativeDll, EntryPoint="MapWindowPointsWrapper", SetLastError = true, ExactSpelling=true, CharSet=CharSet.Auto)] 137[DllImport(PresentationNativeDll, EntryPoint="SetFocusWrapper", SetLastError = true)] 146[DllImport(PresentationNativeDll, EntryPoint="SetWindowLongWrapper", CharSet=CharSet.Auto, SetLastError=true)] 155[DllImport(PresentationNativeDll, EntryPoint="SetWindowLongPtrWrapper", CharSet=CharSet.Auto, SetLastError=true)]
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (46)
53[DllImport(ExternDll.User32, EntryPoint = "SetWindowPos", ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)] 56[DllImport(ExternDll.User32, ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)] 59[DllImport(ExternDll.Shcore, CharSet = CharSet.Auto, SetLastError = true)] 62[DllImport(ExternDll.User32, EntryPoint = "IsProcessDPIAware", CharSet = CharSet.Auto, SetLastError = true)] 65[DllImport(ExternDll.Kernel32, CharSet = CharSet.Auto, SetLastError = true)] 68[DllImport(ExternDll.User32, EntryPoint = "EnableNonClientDpiScaling", CharSet = CharSet.Auto, SetLastError = true)] 71[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 74[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 80[DllImport(ExternDll.Gdi32, SetLastError = true, ExactSpelling = true, EntryPoint = "CreateCompatibleBitmap", CharSet = CharSet.Auto)] 83[DllImport(ExternDll.Gdi32, EntryPoint = "GetStockObject", SetLastError = true, CharSet = CharSet.Auto)] 86[DllImport(ExternDll.User32, EntryPoint = "FillRect", SetLastError = true, CharSet = CharSet.Auto)] 89[DllImport(ExternDll.Gdi32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 105[DllImport(ExternDll.Gdi32, SetLastError = true, ExactSpelling = true, EntryPoint = "DeleteObject", CharSet = CharSet.Auto)] 108[DllImport(ExternDll.Gdi32, EntryPoint = "SelectObject", SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 111[DllImport(ExternDll.User32, EntryPoint = "PrintWindow", SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 158[DllImport(ExternDll.Shell32, CharSet = CharSet.Unicode, SetLastError = true)] 164[DllImport(ExternDll.Kernel32, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)] 235[DllImport(ExternDll.Ole32, ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)] 238[DllImport(ExternDll.Kernel32, EntryPoint = "CloseHandle", CharSet = CharSet.Auto, SetLastError = true)] 261[DllImport(ExternDll.Kernel32, EntryPoint = "UnmapViewOfFile", CharSet = CharSet.Auto, SetLastError = true)] 303[DllImport(ExternDll.Gdi32, SetLastError = true, CharSet = CharSet.Auto)] 309[DllImport(ExternDll.User32, EntryPoint = "GetCursorPos", ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)] 492[DllImport(ExternDll.User32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 498[DllImport(ExternDll.Kernel32, EntryPoint = "GetModuleHandle", CharSet = CharSet.Auto, BestFitMapping = false, ThrowOnUnmappableChar = true, SetLastError = true)] 517[DllImport(ExternDll.Kernel32, SetLastError = true, EntryPoint = "GetProcAddress", CharSet = CharSet.Ansi, BestFitMapping = false)] 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)] 750[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 753[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 756[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 759[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 762[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)] 768[DllImport(ExternDll.User32, EntryPoint = "ClientToScreen", SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 835[DllImport(ExternDll.User32, SetLastError = true, ExactSpelling = true, EntryPoint = "GetDC", CharSet = CharSet.Auto)] 857[DllImport(ExternDll.Gdi32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)] 867[DllImport(ExternDll.User32, ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)] 870[DllImport(ExternDll.User32, SetLastError = true)] 889[DllImport(ExternDll.User32, EntryPoint = "DestroyIcon", CharSet = CharSet.Auto, SetLastError = true)] 910[DllImport(ExternDll.Gdi32, EntryPoint = "DeleteObject", CharSet = CharSet.Auto, SetLastError = true)] 954[DllImport(ExternDll.Gdi32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto, EntryPoint = "CreateBitmap")] 969[DllImport(ExternDll.User32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto, EntryPoint = "CreateIconIndirect")] 1041[DllImport(ExternDll.User32, EntryPoint = "CreateWindowEx", CharSet = CharSet.Auto, BestFitMapping = false, SetLastError = true)] 1060[DllImport(ExternDll.User32, SetLastError = true, EntryPoint = "DestroyWindow", CharSet = CharSet.Auto)] 2653[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto)] 2659[DllImport(ExternDll.User32, SetLastError = true, CharSet = CharSet.Auto)]
vbc (5)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (5)
73[DllImport("kernel32.dll", SetLastError = true)] 80[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 97[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 172[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 183[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
VBCSCompiler (6)
src\roslyn\src\Compilers\Server\VBCSCompiler\MemoryHelper.cs (1)
61[DllImport("kernel32.dll", SetLastError = true)]
src\roslyn\src\Compilers\Shared\NativeMethods.cs (5)
73[DllImport("kernel32.dll", SetLastError = true)] 80[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 97[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 172[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 183[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
vstest.console (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
vstest.console.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
194[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] 198[DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
WindowsFormsIntegration (2)
MS\Win32\UnsafeNativeMethods.cs (1)
32[DllImport(ExternDll.User32, CharSet = CharSet.Auto, SetLastError = true)]
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (1)
35[DllImport(PresentationNativeDll, EntryPoint="EnableWindowWrapper", SetLastError = true, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
6 references to SetLastError
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\ConvertToLibraryImportFixer.cs (1)
167nameof(DllImportAttribute.SetLastError),
LibraryImportGenerator.cs (1)
472NameEqualsSyntax name = NameEquals(nameof(DllImportAttribute.SetLastError));
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
403NameEqualsSyntax name = NameEquals(nameof(DllImportAttribute.SetLastError));
System.Private.CoreLib (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeCustomAttributeData.cs (1)
336new CustomAttributeNamedArgument(type.GetField("SetLastError")!, dllImport.SetLastError),
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.DllImport.cs (2)
47attributeType.ToCustomAttributeNamedArgument(nameof(DllImportAttribute.SetLastError), ct[CoreType.Boolean], dia.SetLastError),