Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Use C# sizeof wherever possible #493

Merged
merged 2 commits into from
Jul 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
Restore NuGet packages.
.Parameter Build
Build the entire project. Requires that -Restore is or has been executed.
.Parameter Rebuild
Build the entire project with the Rebuild target. This may be slower than -Build but ensures you'll see any build warnings from prior builds. Requires that -Restore is or has been executed.
.Parameter Test
Run all built tests.
.Parameter Configuration
Expand All @@ -22,6 +24,7 @@
Param(
[switch]$Restore,
[switch]$Build,
[switch]$Rebuild,
[switch]$Test,
[Parameter()][ValidateSet('debug', 'release')]
[string]$Configuration = $env:BUILDCONFIGURATION,
Expand Down Expand Up @@ -57,7 +60,7 @@ $PackageRestoreRoot = if ($env:NUGET_PACKAGES) { $env:NUGET_PACKAGES } else { Jo
$MSBuildCommand = Get-Command MSBuild.exe -ErrorAction SilentlyContinue

Function Get-ExternalTools {
if ($Build -and !$MSBuildCommand) {
if (($Build -or $Rebuild) -and !$MSBuildCommand) {
Write-Error "Unable to find MSBuild.exe. Make sure you're running in a VS Developer Prompt."
exit 1;
}
Expand All @@ -70,9 +73,11 @@ if ($Restore -and $PSCmdlet.ShouldProcess($SolutionFile, "Restore packages")) {
& "$PSScriptRoot\init.ps1"
}

if ($Build -and $PSCmdlet.ShouldProcess($SolutionFile, "Build")) {
if (($Build -or $Rebuild) -and $PSCmdlet.ShouldProcess($SolutionFile, "Build")) {
$msbuildTarget = "build"
if ($Rebuild) { $msbuildTarget = "rebuild" }
$buildArgs = @()
$buildArgs += $SolutionFile,'/nologo','/nr:false','/m','/v:minimal','/t:build,pack'
$buildArgs += $SolutionFile,'/nologo','/nr:false','/m','/v:minimal',"/t:$msbuildTarget,pack"
$buildArgs += "/p:Configuration=$Configuration"
$buildArgs += "/clp:ForceNoAlign;Summary"
$buildArgs += '/fl','/flp:verbosity=normal;logfile=msbuild.log','/flp1:warningsonly;logfile=msbuild.wrn;NoSummary;verbosity=minimal','/flp2:errorsonly;logfile=msbuild.err;NoSummary;verbosity=minimal'
Expand Down
2 changes: 1 addition & 1 deletion src/BCrypt.Tests/BCryptFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public unsafe void MultiHash()
using (hash)
{
var ops = new BCRYPT_MULTI_HASH_OPERATION[parallelism];
int opsSize = parallelism * Marshal.SizeOf<BCRYPT_MULTI_HASH_OPERATION>();
int opsSize = parallelism * sizeof(BCRYPT_MULTI_HASH_OPERATION);
fixed (byte* dataPtr = data)
{
for (int i = 0; i < ops.Length; i++)
Expand Down
6 changes: 1 addition & 5 deletions src/BCrypt/BCrypt+BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ public static BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO Create()
{
return new BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO
{
#if NETSTANDARD2_0_ORLATER || NETFX_CORE
cbSize = Marshal.SizeOf<BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO>(),
#else
cbSize = Marshal.SizeOf(typeof(BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO)),
#endif
cbSize = sizeof(BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO),
dwInfoVersion = BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION,
};
}
Expand Down
8 changes: 2 additions & 6 deletions src/BCrypt/BCrypt+BCRYPT_KEY_DATA_BLOB_HEADER.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@ public static byte[] InsertBeforeKey(byte[] keyMaterial)
return header.AddHeaderToKey(keyMaterial);
}

private byte[] AddHeaderToKey(byte[] keyMaterial)
private unsafe byte[] AddHeaderToKey(byte[] keyMaterial)
{
#if NETSTANDARD2_0_ORLATER || NETFX_CORE
int headerLength = Marshal.SizeOf<BCRYPT_KEY_DATA_BLOB_HEADER>();
#else
int headerLength = Marshal.SizeOf(typeof(BCRYPT_KEY_DATA_BLOB_HEADER));
#endif
int headerLength = sizeof(BCRYPT_KEY_DATA_BLOB_HEADER);
byte[] keyWithHeader = new byte[headerLength + keyMaterial.Length];
Array.Copy(BitConverter.GetBytes((uint)this.dwMagic), keyWithHeader, sizeof(uint));
Array.Copy(BitConverter.GetBytes(this.dwVersion), 0, keyWithHeader, sizeof(uint), sizeof(uint));
Expand Down
2 changes: 1 addition & 1 deletion src/CfgMgr32.Tests/CfgMgr32Facts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class CfgMgr32Facts
[Fact]
public void CM_NOTIFY_FILTER_Test()
{
Assert.Equal(0x1a0, Marshal.SizeOf<CM_NOTIFY_FILTER>());
Assert.Equal(0x1a0, CM_NOTIFY_FILTER.Create().cbSize);
}

[Fact]
Expand Down
8 changes: 1 addition & 7 deletions src/Fusion/MSCorEE+ASSEMBLY_INFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,7 @@ public unsafe partial struct ASSEMBLY_INFO
/// with the <see cref="cbAssemblyInfo"/> field initialized.
/// </summary>
/// <returns>The newly initialized struct.</returns>
public static ASSEMBLY_INFO Create()
{
return new ASSEMBLY_INFO
{
cbAssemblyInfo = (uint)Marshal.SizeOf(typeof(ASSEMBLY_INFO)),
};
}
public static ASSEMBLY_INFO Create() => new ASSEMBLY_INFO { cbAssemblyInfo = (uint)sizeof(ASSEMBLY_INFO) };
}
}
}
7 changes: 1 addition & 6 deletions src/Hid/Hid+HiddAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ public struct HiddAttributes
/// </summary>
public ushort VersionNumber;

public static HiddAttributes Create()
{
var result = default(HiddAttributes);
result.Size = Marshal.SizeOf(result);
return result;
}
public static unsafe HiddAttributes Create() => new HiddAttributes { Size = sizeof(HiddAttributes) };
}
}
}
8 changes: 4 additions & 4 deletions src/IPHlpApi.Tests/IPHlpApiFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
public class IPHlpApiFacts
{
[Fact]
public void StructSizeTest()
public unsafe void StructSizeTest()
{
Assert.Equal(0x04, Marshal.SizeOf<IPHlpApi.MIB_TCPTABLE_OWNER_PID>());
Assert.Equal(0x18, Marshal.SizeOf<IPHlpApi.MIB_TCPROW_OWNER_PID>());
Assert.Equal(0x04, sizeof(IPHlpApi.MIB_TCPTABLE_OWNER_PID));
Assert.Equal(0x18, sizeof(IPHlpApi.MIB_TCPROW_OWNER_PID));
}

[Fact]
Expand All @@ -32,7 +32,7 @@ public unsafe void GetExtendedTcpTableTest()
if (IPHlpApi.GetExtendedTcpTable(tcpTablePtr, ref tcpTableLength, bOrder: true, AddressFamily.InterNetwork, IPHlpApi.TCP_TABLE_CLASS.TCP_TABLE_OWNER_PID_ALL, 0) == Win32ErrorCode.ERROR_SUCCESS)
{
IPHlpApi.MIB_TCPTABLE_OWNER_PID* tcpTable = (IPHlpApi.MIB_TCPTABLE_OWNER_PID*)tcpTablePtr;
var tableSize = Marshal.SizeOf<IPHlpApi.MIB_TCPTABLE_OWNER_PID>();
var tableSize = sizeof(IPHlpApi.MIB_TCPTABLE_OWNER_PID);

IPHlpApi.MIB_TCPROW_OWNER_PID* tcpRow = (IPHlpApi.MIB_TCPROW_OWNER_PID*)(tcpTablePtr + tableSize);

Expand Down
9 changes: 1 addition & 8 deletions src/Kernel32/Kernel32+OSVERSIONINFOEX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,7 @@ public unsafe partial struct OSVERSIONINFOEX
/// the right pre-initialization for <see cref="dwOSVersionInfoSize"/>
/// </summary>
/// <returns>A newly initialzed instance of <see cref="OSVERSIONINFOEX"/></returns>
public static OSVERSIONINFOEX Create() => new OSVERSIONINFOEX
{
#if NETSTANDARD2_0_ORLATER || NETFX_CORE
dwOSVersionInfoSize = Marshal.SizeOf<OSVERSIONINFOEX>()
#else
dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFOEX))
#endif
};
public static OSVERSIONINFOEX Create() => new OSVERSIONINFOEX { dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX) };
}
}
}
12 changes: 1 addition & 11 deletions src/Kernel32/Kernel32+SECURITY_ATTRIBUTES.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,7 @@ public struct SECURITY_ATTRIBUTES
/// Initializes a new instance of the <see cref="SECURITY_ATTRIBUTES"/> struct.
/// </summary>
/// <returns>A new instance of <see cref="SECURITY_ATTRIBUTES"/>.</returns>
public static SECURITY_ATTRIBUTES Create()
{
return new SECURITY_ATTRIBUTES
{
#if NETSTANDARD2_0_ORLATER || NETFX_CORE
nLength = Marshal.SizeOf<SECURITY_ATTRIBUTES>(),
#else
nLength = Marshal.SizeOf(typeof(SECURITY_ATTRIBUTES)),
#endif
};
}
public static unsafe SECURITY_ATTRIBUTES Create() => new SECURITY_ATTRIBUTES { nLength = sizeof(SECURITY_ATTRIBUTES) };
}
}
}
5 changes: 3 additions & 2 deletions src/Kernel32/Kernel32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,9 @@ public static partial class Kernel32
/// </summary>
/// <param name="lpVersionInformation">
/// A pointer to an OSVERSIONINFOEX structure containing the operating system version requirements to compare. The <paramref name="dwTypeMask"/>
/// parameter indicates the members of this structure that contain information to compare.You must set the
/// <see cref="OSVERSIONINFOEX.dwOSVersionInfoSize"/> member of this structure to <code>Marshal.SizeOf(typeof(OSVERSIONINFOEX))</code>. You must
/// parameter indicates the members of this structure that contain information to compare. You must set the
/// <see cref="OSVERSIONINFOEX.dwOSVersionInfoSize"/> member of this structure to <code>Marshal.SizeOf(typeof(OSVERSIONINFOEX))</code>
/// or create it with <see cref="OSVERSIONINFOEX.Create"/>. You must
/// also specify valid data for the members indicated by <paramref name="dwTypeMask"/>. The function ignores structure members for which the
/// corresponding <paramref name="dwTypeMask"/> bit is not set
/// </param>
Expand Down
6 changes: 1 addition & 5 deletions src/Kernel32/storebanned/Kernel32+MODULEENTRY32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ public static MODULEENTRY32 Create()
{
return new MODULEENTRY32
{
#if NETSTANDARD2_0_ORLATER
dwSize = Marshal.SizeOf<MODULEENTRY32>(),
#else
dwSize = Marshal.SizeOf(typeof(MODULEENTRY32)),
#endif
dwSize = sizeof(MODULEENTRY32),
th32ModuleID = 1,
};
}
Expand Down
12 changes: 1 addition & 11 deletions src/Kernel32/storebanned/Kernel32+PROCESSENTRY32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,7 @@ public string ExeFile
/// with <see cref="dwSize" /> set to the correct value.
/// </summary>
/// <returns>An instance of <see cref="PROCESSENTRY32"/>.</returns>
public static PROCESSENTRY32 Create()
{
return new PROCESSENTRY32
{
#if NETSTANDARD2_0_ORLATER
dwSize = Marshal.SizeOf<PROCESSENTRY32>(),
#else
dwSize = Marshal.SizeOf(typeof(PROCESSENTRY32)),
#endif
};
}
public static PROCESSENTRY32 Create() => new PROCESSENTRY32 { dwSize = sizeof(PROCESSENTRY32) };
}
}
}
12 changes: 1 addition & 11 deletions src/Kernel32/storebanned/Kernel32+StartupInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,7 @@ public unsafe partial struct STARTUPINFO
/// Initializes a new instance of the <see cref="STARTUPINFO"/> struct.
/// </summary>
/// <returns>An initialized instance of the struct.</returns>
public static STARTUPINFO Create()
{
return new STARTUPINFO
{
#if NETSTANDARD2_0_ORLATER
cb = Marshal.SizeOf<STARTUPINFO>(),
#else
cb = Marshal.SizeOf(typeof(STARTUPINFO)),
#endif
};
}
public static STARTUPINFO Create() => new STARTUPINFO { cb = sizeof(STARTUPINFO) };
}
}
}
10 changes: 8 additions & 2 deletions src/Magnification.Tests/MagnificationFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ public void InitializeThenDeinitialize()
}

[Fact]
public void MAGCOLOREFFECT_IsRightSize()
public unsafe void MAGCOLOREFFECT_IsRightSize()
{
Assert.Equal(sizeof(float) * 5 * 5, Marshal.SizeOf<MAGCOLOREFFECT>());
#pragma warning disable xUnit2000 // Constants and literals should be the expected argument
Assert.Equal(sizeof(float) * 5 * 5, sizeof(MAGCOLOREFFECT));
#pragma warning restore xUnit2000 // Constants and literals should be the expected argument
}

[Fact]
Expand All @@ -43,9 +46,12 @@ public void MAGCOLOREFFECT_MultidimensionalArray()
}

[Fact]
public void MAGTRANSFORM_IsRightSize()
public unsafe void MAGTRANSFORM_IsRightSize()
{
Assert.Equal(sizeof(float) * 3 * 3, Marshal.SizeOf<MAGTRANSFORM>());
#pragma warning disable xUnit2000 // Constants and literals should be the expected argument
Assert.Equal(sizeof(float) * 3 * 3, sizeof(MAGTRANSFORM));
#pragma warning restore xUnit2000 // Constants and literals should be the expected argument
}

[Fact]
Expand Down
12 changes: 1 addition & 11 deletions src/NCrypt/NCrypt+NCRYPT_KEY_BLOB_HEADER.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,7 @@ public enum MagicNumber : uint
/// with the <see cref="cbSize"/> field set appropriately.
/// </summary>
/// <returns>An initialized instance of the struct.</returns>
public static NCRYPT_KEY_BLOB_HEADER Create()
{
return new NCRYPT_KEY_BLOB_HEADER
{
#if NETSTANDARD2_0_ORLATER || NETFX_CORE
cbSize = Marshal.SizeOf<NCRYPT_KEY_BLOB_HEADER>(),
#else
cbSize = Marshal.SizeOf(typeof(NCRYPT_KEY_BLOB_HEADER)),
#endif
};
}
public static unsafe NCRYPT_KEY_BLOB_HEADER Create() => new NCRYPT_KEY_BLOB_HEADER { cbSize = sizeof(NCRYPT_KEY_BLOB_HEADER) };
}
}
}
8 changes: 1 addition & 7 deletions src/NTDll/NTDll+OBJECT_ATTRIBUTES.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,7 @@ public enum ObjectHandleAttributes
/// Initializes a new instance of the <see cref="OBJECT_ATTRIBUTES"/> structure.
/// </summary>
/// <returns>An <see cref="OBJECT_ATTRIBUTES"/> instance with <see cref="Length"/> initialized.</returns>
public static OBJECT_ATTRIBUTES Create()
{
return new OBJECT_ATTRIBUTES
{
Length = Marshal.SizeOf(typeof(OBJECT_ATTRIBUTES)),
};
}
public static OBJECT_ATTRIBUTES Create() => new OBJECT_ATTRIBUTES { Length = sizeof(OBJECT_ATTRIBUTES) };
}
}
}
8 changes: 2 additions & 6 deletions src/SetupApi/SetupApi+SP_DEVICE_INTERFACE_DATA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace PInvoke
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

/// <content>
Expand Down Expand Up @@ -43,12 +44,7 @@ public struct SP_DEVICE_INTERFACE_DATA
/// Create an instance with <see cref="Size" /> set to the correct value.
/// </summary>
/// <returns>An instance of <see cref="SP_DEVICE_INTERFACE_DATA" /> with it's <see cref="Size" /> member set.</returns>
public static SP_DEVICE_INTERFACE_DATA Create()
{
var result = default(SP_DEVICE_INTERFACE_DATA);
result.Size = Marshal.SizeOf(result);
return result;
}
public static unsafe SP_DEVICE_INTERFACE_DATA Create() => new SP_DEVICE_INTERFACE_DATA { Size = sizeof(SP_DEVICE_INTERFACE_DATA) };
}
}
}
8 changes: 1 addition & 7 deletions src/SetupApi/SetupApi+SP_DEVINFO_DATA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ public struct SP_DEVINFO_DATA
/// with <see cref="cbSize" /> set to the correct value.
/// </summary>
/// <returns>An instance of <see cref="SP_DEVINFO_DATA"/>.</returns>
public static SP_DEVINFO_DATA Create()
{
return new SP_DEVINFO_DATA
{
cbSize = Marshal.SizeOf(typeof(SP_DEVINFO_DATA)),
};
}
public static unsafe SP_DEVINFO_DATA Create() => new SP_DEVINFO_DATA { cbSize = sizeof(SP_DEVINFO_DATA) };
}
}
}
8 changes: 1 addition & 7 deletions src/SetupApi/SetupApi+SP_DEVINSTALL_PARAMS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ public string DriverPathString
/// with <see cref="cbSize" /> set to the correct value.
/// </summary>
/// <returns>An instance of <see cref="SP_DEVINSTALL_PARAMS"/>.</returns>
public static SP_DEVINSTALL_PARAMS Create()
{
return new SP_DEVINSTALL_PARAMS
{
cbSize = Marshal.SizeOf(typeof(SP_DEVINSTALL_PARAMS)),
};
}
public static SP_DEVINSTALL_PARAMS Create() => new SP_DEVINSTALL_PARAMS { cbSize = sizeof(SP_DEVINSTALL_PARAMS) };
}
}
}
2 changes: 1 addition & 1 deletion src/SetupApi/SetupApi+SP_DRVINFO_DATA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public unsafe struct SP_DRVINFO_DATA
/// with <see cref="cbSize" /> set to the correct value.
/// </summary>
/// <returns>An instance of <see cref="SP_DRVINFO_DATA"/>.</returns>
public static SP_DRVINFO_DATA Create() => new SP_DRVINFO_DATA { cbSize = Marshal.SizeOf(typeof(SP_DRVINFO_DATA)) };
public static SP_DRVINFO_DATA Create() => new SP_DRVINFO_DATA { cbSize = sizeof(SP_DRVINFO_DATA) };
}
}
}
2 changes: 1 addition & 1 deletion src/User32.Tests/User32Facts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void SetWindowLongPtr_Test()
}

[Fact]
public void MENUBARINFO_MarshalSizeAsExpected()
public unsafe void MENUBARINFO_MarshalSizeAsExpected()
{
MENUBARINFO info = default;
int expectedSize = IntPtr.Size == 4 ? 0x20 : 0x30;
Expand Down
4 changes: 2 additions & 2 deletions src/User32/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ PInvoke.User32.MENUBARINFO.hMenu -> System.IntPtr
PInvoke.User32.MENUBARINFO.hwndMenu -> System.IntPtr
PInvoke.User32.MENUBARINFO.rcBar -> PInvoke.RECT
PInvoke.User32.MENUINFO
PInvoke.User32.MENUINFO.Create() -> PInvoke.User32.MENUINFO
PInvoke.User32.MENUINFO.MENUINFO() -> void
PInvoke.User32.MENUINFO.cbSize -> int
PInvoke.User32.MENUINFO.cyMax -> uint
Expand Down Expand Up @@ -215,6 +214,7 @@ static PInvoke.User32.LoadCursor(System.IntPtr hInstance, char[] lpCursorName) -
static PInvoke.User32.LoadImage(System.IntPtr hInst, System.IntPtr name, PInvoke.User32.ImageType type, int cx, int cy, PInvoke.User32.LoadImageFlags fuLoad) -> System.IntPtr
static PInvoke.User32.LoadImage(System.IntPtr hInst, char[] name, PInvoke.User32.ImageType type, int cx, int cy, PInvoke.User32.LoadImageFlags fuLoad) -> System.IntPtr
static PInvoke.User32.MENUBARINFO.Create() -> PInvoke.User32.MENUBARINFO
static PInvoke.User32.MENUINFO.Create() -> PInvoke.User32.MENUINFO
static PInvoke.User32.MsgWaitForMultipleObjectsEx(uint nCount, System.IntPtr pHandles, uint dwMilliseconds, PInvoke.User32.WakeMask dwWakeMask, PInvoke.User32.MsgWaitForMultipleObjectsExFlags dwFlags) -> uint
static PInvoke.User32.MsgWaitForMultipleObjectsEx(uint nCount, System.IntPtr[] pHandles, uint dwMilliseconds, PInvoke.User32.WakeMask dwWakeMask, PInvoke.User32.MsgWaitForMultipleObjectsExFlags dwFlags) -> uint
static PInvoke.User32.SetMenuItemInfo(System.IntPtr hMenu, uint uItem, bool fByPosition, PInvoke.User32.MENUITEMINFO lpmii) -> bool
Expand Down Expand Up @@ -281,4 +281,4 @@ static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 -> Sys
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE -> System.IntPtr
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_UNAWARE -> System.IntPtr
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED -> System.IntPtr
static readonly PInvoke.User32.SafeCursorHandle.Null -> PInvoke.User32.SafeCursorHandle
static readonly PInvoke.User32.SafeCursorHandle.Null -> PInvoke.User32.SafeCursorHandle
Loading