mirror of https://github.com/dahall/Vanara.git
Updates to existing code with breaking changes.
parent
d1f31b4154
commit
174f5219ec
|
@ -15,7 +15,7 @@ namespace Vanara.PInvoke.Tests
|
|||
var f = new Form { Size = new System.Drawing.Size(100, 100) };
|
||||
var btn = new TextBox { Size = new System.Drawing.Size(50, 12), Location = new System.Drawing.Point(5, 5) };
|
||||
var tip = new EDITBALLOONTIP("Test", "tested");
|
||||
btn.HandleCreated += (s, a) => SendMessage(new System.Runtime.InteropServices.HandleRef(btn, btn.Handle), EditMessage.EM_SHOWBALLOONTIP, 0, ref tip);
|
||||
btn.HandleCreated += (s, a) => SendMessage(new System.Runtime.InteropServices.HandleRef(btn, btn.Handle), User32_Gdi.EditMessage.EM_SHOWBALLOONTIP, 0, ref tip);
|
||||
f.Controls.Add(btn);
|
||||
f.ShowDialog();
|
||||
}
|
||||
|
|
|
@ -16,7 +16,9 @@ namespace Vanara.PInvoke.Tests
|
|||
[Test]
|
||||
public void NtQuerySystemInformationTest()
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
var bi = NtQuerySystemInformation<SYSTEM_BASIC_INFORMATION>(SYSTEM_INFORMATION_CLASS.SystemBasicInformation);
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
Assert.That(bi.NumberOfProcessors, Is.Not.Zero);
|
||||
var qi = NtQuerySystemInformation<SYSTEM_REGISTRY_QUOTA_INFORMATION>(SYSTEM_INFORMATION_CLASS.SystemRegistryQuotaInformation);
|
||||
Assert.That(qi.RegistryQuotaUsed, Is.Not.Zero);
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Vanara.Extensions
|
|||
{
|
||||
var size = Size.Empty;
|
||||
var info = new ICONINFO();
|
||||
GetIconInfo(cursor.Handle, info);
|
||||
GetIconInfo(new SafeIconHandle(cursor.Handle, false), info);
|
||||
if (info.hbmColor != IntPtr.Zero)
|
||||
{
|
||||
using (var bm = Image.FromHbitmap(info.hbmColor))
|
||||
|
|
Loading…
Reference in New Issue