9 instantiations of NativeCallException
aspire-tray (9)
NativeMethods.cs (1)
340
throw new
NativeCallException
(operation, Marshal.GetLastPInvokeError());
TrayApplication.Actions.cs (1)
180
throw new
NativeCallException
("ShellExecuteW(open URL)", (int)result);
TrayApplication.cs (5)
65
completion.SetException(new
NativeCallException
("PostMessageW(restore)", Marshal.GetLastPInvokeError()));
80
_callbackFailure ??= new
NativeCallException
("PostMessageW(quit)", Marshal.GetLastPInvokeError());
197
_callbackFailure ??= new
NativeCallException
("PostMessageW(refresh)", Marshal.GetLastPInvokeError());
242
throw new
NativeCallException
("Shell_NotifyIconW(NIM_SETVERSION)");
399
throw new
NativeCallException
("Shell_NotifyIconW(Explorer recovery)");
TrayApplication.Panel.cs (2)
135
throw new
NativeCallException
("GdiplusStartup");
841
throw new
NativeCallException
($"{operation} (GDI+ status {status})");
52 references to NativeCallException
aspire-tray (52)
Program.cs (1)
130
NativeCallException
=> ex.Message,
TrayApplication.Actions.cs (1)
158
NativeCallException
.Require(NativeMethods.MessageBox(_modalOwner, detail, title, flags) != 0, "MessageBoxW");
TrayApplication.Clipboard.cs (7)
21
NativeCallException
.Require(memory != 0, "GlobalAlloc(clipboard)");
25
NativeCallException
.Require(buffer != 0, "GlobalLock(clipboard)");
31
NativeCallException
.Require(unlocked != 0 || Marshal.GetLastPInvokeError() == 0, "GlobalUnlock(clipboard)");
32
NativeCallException
.Require(NativeMethods.OpenClipboard(_window) != 0, "OpenClipboard");
35
NativeCallException
.Require(NativeMethods.EmptyClipboard() != 0, "EmptyClipboard");
36
NativeCallException
.Require(NativeMethods.SetClipboardData(13, memory) != 0, "SetClipboardData");
41
NativeCallException
.Require(NativeMethods.CloseClipboard() != 0, "CloseClipboard");
TrayApplication.cs (8)
108
NativeCallException
.Require(result != -1, "GetMessageW");
135
NativeCallException
.Require(_previousDpiContext != 0, "SetThreadDpiAwarenessContext");
137
NativeCallException
.Require(_module != 0, "GetModuleHandleW");
139
NativeCallException
.Require(_taskbarCreated != 0, "RegisterWindowMessageW");
146
NativeCallException
.Require(NativeMethods.RegisterClass(ref windowClass) != 0, "RegisterClassW");
151
NativeCallException
.Require(window != 0, "CreateWindowExW");
179
NativeCallException
.Require(_timerAdded, "SetTimer");
183
NativeCallException
.Require(NativeMethods.PostMessage(window, NativeMethods.ReadyMessage, 0, 0) != 0, "PostMessageW(ready)");
TrayApplication.Icons.cs (9)
44
NativeCallException
.Require(Size > 0, "GetSystemMetricsForDpi");
49
NativeCallException
.Require(original != 0, "LoadImageW(Aspire.ico)");
120
NativeCallException
.Require(mask != 0, "CreateBitmap(icon mask)");
125
NativeCallException
.Require(icon != 0, "CreateIconIndirect");
166
NativeCallException
.Require(Handle != 0, "CreateDIBSection");
233
NativeCallException
.Require(dc != 0, "CreateCompatibleDC");
238
NativeCallException
.Require(previous != 0 && previous != -1, "SelectObject");
239
NativeCallException
.Require(NativeMethods.DrawIconEx(dc, 0, 0, icon, _size, _size, 0, 0, 3) != 0, "DrawIconEx");
241
NativeCallException
.Require(NativeMethods.GdiFlush() != 0, "GdiFlush");
TrayApplication.NativeSmoke.cs (10)
30
NativeCallException
.Require(data.Icon != 0, "LoadIconW(smoke control)");
40
NativeCallException
.Require(NativeMethods.ShellNotifyIcon(NativeMethods.NimDelete, ref data) != 0, "Shell_NotifyIconW(smoke control delete)");
124
NativeCallException
.Require(NativeMethods.GetWindowRect(_panelWindow, out var rect) != 0, "GetWindowRect(capture)");
130
NativeCallException
.Require(screen != 0, "GetDC(screen)");
137
NativeCallException
.Require(NativeMethods.BitBlt(memory, 0, 0, width, height, screen, rect.Left, rect.Top, 0x00CC0020 | 0x40000000) != 0,
183
NativeCallException
.Require(button != 0, "GetDlgItem(smoke dialog response)");
186
NativeCallException
.Require(NativeMethods.PostMessage(dialog, NativeMethods.WmCommand, (nuint)pending.Response, button) != 0, "PostMessageW(smoke dialog response)");
347
NativeCallException
.Require(NativeMethods.GetKeyboardState(state) != 0, "GetKeyboardState(smoke)");
350
NativeCallException
.Require(NativeMethods.SetKeyboardState(state) != 0, "SetKeyboardState(smoke)");
407
NativeCallException
.Require(NativeMethods.ShellNotifyIcon(NativeMethods.NimDelete, ref _iconData) != 0, "Shell_NotifyIconW(smoke delete)");
TrayApplication.Panel.cs (16)
147
NativeCallException
.Require(NativeMethods.RegisterClass(ref windowClass) != 0, "RegisterClassW(flyout)");
155
NativeCallException
.Require(_panelWindow != 0, "CreateWindowExW(flyout)");
169
NativeCallException
.Require(NativeMethods.GetMonitorInfo(monitor, ref info) != 0, "GetMonitorInfoW(flyout)");
213
NativeCallException
.Require(NativeMethods.SetWindowPos(_panelWindow, -1, x, y, width, height, show ? 0x40u : 0x10u) != 0,
244
NativeCallException
.Require(NativeMethods.InitCommonControlsEx(in controls) != 0, "InitCommonControlsEx");
248
NativeCallException
.Require(_panelTooltip != 0, "CreateWindowExW(flyout tooltip)");
276
NativeCallException
.Require(NativeMethods.SendMessage(_panelTooltip, NativeMethods.TtmAddTool, 0, (nint)(&tool)) != 0,
293
NativeCallException
.Require(NativeMethods.GetCursorPos(out var point) != 0, "GetCursorPos(flyout)");
441
NativeCallException
.Require(memory != 0, "CreateCompatibleDC(flyout)");
445
NativeCallException
.Require(bitmap != 0, "CreateCompatibleBitmap(flyout)");
448
NativeCallException
.Require(NativeMethods.BitBlt(dc, 0, 0, width, height, memory, 0, 0, 0x00CC0020) != 0, "BitBlt(flyout)"); // SRCCOPY
503
WithGdiDc(graphics, clips, gdi =>
NativeCallException
.Require(
685
NativeCallException
.Require(NativeMethods.GetTextMetrics(dc, out var metrics) != 0, "GetTextMetricsW(flyout)");
759
NativeCallException
.Require(_panelLogo != 0, "LoadImageW(flyout logo)");
762
NativeCallException
.Require(NativeMethods.DrawIconEx(dc, rect.Left, rect.Top, _panelLogo, size, size, 0, 0, 3) != 0,
796
NativeCallException
.Require(font != 0, "CreateFontW(flyout)");