You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2023. It is now read-only.
@@ -180,6 +197,9 @@ static PInvoke.User32.CreateCursor(System.IntPtr hInst, int xHotspot, int yHotSp
180
197
static PInvoke.User32.CreateCursor(System.IntPtr hInst, int xHotspot, int yHotSpot, int nWidth, int nHeight, byte[] pvANDPlane, byte[] pvXORPlane) -> PInvoke.User32.SafeCursorHandle
181
198
static PInvoke.User32.CreateWindowEx(PInvoke.User32.WindowStylesEx dwExStyle, short lpClassName, string lpWindowName, PInvoke.User32.WindowStyles dwStyle, int x, int y, int nWidth, int nHeight, System.IntPtr hWndParent, System.IntPtr hMenu, System.IntPtr hInstance, System.IntPtr lpParam) -> System.IntPtr
182
199
static PInvoke.User32.CreateWindowEx(PInvoke.User32.WindowStylesEx dwExStyle, short lpClassName, string lpWindowName, PInvoke.User32.WindowStyles dwStyle, int x, int y, int nWidth, int nHeight, System.IntPtr hWndParent, System.IntPtr hMenu, System.IntPtr hInstance, void* lpParam) -> System.IntPtr
static extern PInvoke.User32.CreateCursor(System.IntPtr hInst, int xHotspot, int yHotSpot, int nWidth, int nHeight, byte* pvANDPlane, byte* pvXORPlane) -> PInvoke.User32.SafeCursorHandle
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
namespacePInvoke
5
+
{
6
+
usingSystem.Runtime.InteropServices;
7
+
8
+
/// <content>
9
+
/// Contains the <see cref="DISPLAY_DEVICE"/> nested type.
10
+
/// </content>
11
+
publicpartialclassUser32
12
+
{
13
+
/// <summary>
14
+
/// Receives information about the display device specified by the <c>iDevNum</c> parameter of the <see cref="User32.EnumDisplayDevices(string, uint, DISPLAY_DEVICE*, EnumDisplayDevicesFlags)"/> function.
15
+
/// </summary>
16
+
publicunsafestructDISPLAY_DEVICE
17
+
{
18
+
/// <summary>
19
+
/// Size, in bytes, of the DISPLAY_DEVICE structure. This must be initialized prior to calling <see cref="User32.EnumDisplayDevices(string, uint, DISPLAY_DEVICE*, EnumDisplayDevicesFlags)"/>.
20
+
/// </summary>
21
+
publicuintcb;
22
+
23
+
/// <summary>
24
+
/// An array of characters identifying the device name. This is either the adapter device or the monitor device.
25
+
/// </summary>
26
+
publicfixedcharDeviceName[32];
27
+
28
+
/// <summary>
29
+
/// An array of characters containing the device context string. This is either a description of the display adapter or of the display monitor.
30
+
/// </summary>
31
+
publicfixedcharDeviceString[128];
32
+
33
+
/// <summary>
34
+
/// Device state flags.
35
+
/// </summary>
36
+
publicDisplayDeviceFlagsStateFlags;
37
+
38
+
/// <summary>
39
+
/// Not used.
40
+
/// </summary>
41
+
publicfixedcharDeviceID[128];
42
+
43
+
/// <summary>
44
+
/// Reserved.
45
+
/// </summary>
46
+
publicfixedcharDeviceKey[128];
47
+
48
+
/// <summary>
49
+
/// Initializes a new instance of the <see cref="DISPLAY_DEVICE"/> struct
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
namespacePInvoke
5
+
{
6
+
usingSystem;
7
+
8
+
/// <content>
9
+
/// Contains the <see cref="DisplayDeviceFlags"/> nested type.
10
+
/// </content>
11
+
publicpartialclassUser32
12
+
{
13
+
/// <summary>
14
+
/// Device state flags.
15
+
/// </summary>
16
+
[Flags]
17
+
publicenumDisplayDeviceFlags:uint
18
+
{
19
+
/// <summary>
20
+
/// DISPLAY_DEVICE_ACTIVE specifies whether a monitor is presented as being "on" by the respective GDI view.
21
+
/// Windows Vista: EnumDisplayDevices will only enumerate monitors that can be presented as being "on".
22
+
/// </summary>
23
+
DISPLAY_DEVICE_ACTIVE=0x00000001,
24
+
25
+
/// <summary>
26
+
/// Represents a pseudo device used to mirror application drawing for remoting or other purposes. An invisible pseudo monitor is associated with this device.
27
+
/// For example, NetMeeting uses it. Note that <see cref="User32.GetSystemMetrics(User32.SystemMetric)"/> (SM_MONITORS) only accounts for visible display monitors.
28
+
/// </summary>
29
+
DISPLAY_DEVICE_MIRRORING_DRIVER=0x00000008,
30
+
31
+
/// <summary>The device has more display modes than its output devices support.</summary>
32
+
DISPLAY_DEVICE_MODESPRUNED=0x08000000,
33
+
34
+
/// <summary>
35
+
/// The primary desktop is on the device. For a system with a single display card, this is always set.
36
+
/// For a system with multiple display cards, only one device can have this set.
37
+
/// </summary>
38
+
DISPLAY_DEVICE_PRIMARY_DEVICE=0x00000004,
39
+
40
+
/// <summary>The device is removable; it cannot be the primary display.</summary>
41
+
DISPLAY_DEVICE_REMOVABLE=0x00000020,
42
+
43
+
/// <summary>The device is VGA compatible.</summary>
/// Enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers)
1637
+
/// that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a device context.
1638
+
/// EnumDisplayMonitors calls an application-defined <see cref="MONITORENUMPROC"/> callback function once for each monitor that is enumerated. Note that <see cref="GetSystemMetrics(SystemMetric)"/> counts only the display monitors.
1639
+
/// </summary>
1640
+
/// <param name="hdc">
1641
+
/// A handle to a display device context that defines the visible region of interest.
1642
+
/// If this parameter is NULL, the hdcMonitor parameter passed to the callback function will be NULL,
1643
+
/// and the visible region of interest is the virtual screen that encompasses all the displays on the desktop.
1644
+
/// </param>
1645
+
/// <param name="lprcClip">
1646
+
/// A pointer to a RECT structure that specifies a clipping rectangle.
1647
+
/// The region of interest is the intersection of the clipping rectangle with the visible region specified by hdc.
1648
+
/// If hdc is non-NULL, the coordinates of the clipping rectangle are relative to the origin of the hdc.If hdc is NULL, the coordinates are virtual-screen coordinates.
1649
+
/// This parameter can be NULL if you don't want to clip the region specified by hdc.
1650
+
/// </param>
1651
+
/// <param name="lpfnEnum">A pointer to a <see cref="MONITORENUMPROC"/> application-defined callback function.</param>
1652
+
/// <param name="dwData">Application-defined data that EnumDisplayMonitors passes directly to the MonitorEnumProc function.</param>
1653
+
/// <returns>
1654
+
/// If the function succeeds, the return value is nonzero.
1655
+
/// If the function fails, the return value is zero.
/// Lets you obtain information about the display devices in the current session.
1666
+
/// </summary>
1667
+
/// <param name="lpDevice">A pointer to the device name. If <c>NULL</c>, function returns information for the display adapter(s) on the machine, based on <paramref name="iDevNum"/>.</param>
1668
+
/// <param name="iDevNum">
1669
+
/// An index value that specifies the display device of interest.
1670
+
/// The operating system identifies each display device in the current session with an index value.
1671
+
/// The index values are consecutive integers, starting at 0. If the current session has three display devices, for example, they are specified by the index values 0, 1, and 2.
1672
+
/// </param>
1673
+
/// <param name="lpDisplayDevice">
1674
+
/// A pointer to a <see cref="DISPLAY_DEVICE"/> structure that receives information about the display device specified by <paramref name="iDevNum"/>.
1675
+
/// Before calling <see cref="EnumDisplayDevices(string, uint, DISPLAY_DEVICE*, EnumDisplayDevicesFlags)"/>, you must initialize the member <see cref="DISPLAY_DEVICE.cb"/> to the size, in bytes, of <see cref="DISPLAY_DEVICE"/>.
1676
+
/// </param>
1677
+
/// <param name="dwFlags">
1678
+
/// Set this flag to <see cref="EnumDisplayDevicesFlags.EDD_GET_DEVICE_INTERFACE_NAME"/> to retrieve the device interface name for <c>GUID_DEVINTERFACE_MONITOR</c>, which is registered by the operating system on a per monitor basis.
1679
+
/// The value is placed in the <see cref="DISPLAY_DEVICE.DeviceID"/> structure returned in <paramref name="lpDisplayDevice"/>.
1680
+
/// The resulting device interface name can be used with SetupAPI functions and serves as a link between GDI monitor devices and SetupAPI monitor devices.
1681
+
/// </param>
1682
+
/// <returns>
1683
+
/// If the function succeeds, the return value is nonzero.
1684
+
/// If the function fails, the return value is zero.
1685
+
/// The function fails if <paramref name="iDevNum"/> is greater than the largest device index.
1686
+
/// </returns>
1687
+
/// <remarks>
1688
+
/// See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumdisplaydevicesa#remarks.
0 commit comments