User32EnumDesktopWindows Method
Enumerates all top-level windows associated with the specified desktop.
It passes the handle to each window, in turn, to an application-defined callback function
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool EnumDesktopWindows(
IntPtr hDesktop,
DelegatesEnumWindowsProc lpEnumFunc,
IntPtr lParam
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function EnumDesktopWindows (
hDesktop As IntPtr,
lpEnumFunc As DelegatesEnumWindowsProc,
lParam As IntPtr
) As Boolean
Dim hDesktop As IntPtr
Dim lpEnumFunc As DelegatesEnumWindowsProc
Dim lParam As IntPtr
Dim returnValue As Boolean
returnValue = User32.EnumDesktopWindows(hDesktop,
lpEnumFunc, lParam)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool EnumDesktopWindows(
IntPtr hDesktop,
DelegatesEnumWindowsProc^ lpEnumFunc,
IntPtr lParam
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member EnumDesktopWindows :
hDesktop : IntPtr *
lpEnumFunc : DelegatesEnumWindowsProc *
lParam : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hDesktop IntPtr
-
A handle to the desktop whose top-level windows are to be enumerated.
This handle is returned by the CreateDesktop, GetThreadDesktop,
OpenDesktop, or OpenInputDesktop function,
and must have the DESKTOP_READOBJECTS access right.
- lpEnumFunc DelegatesEnumWindowsProc
-
A pointer to an application-defined callback function.
- lParam IntPtr
-
An application-defined value to be passed to the callback function.
Boolean
if the function succeeds, the return value is
.
If the function fails or is unable to perform the enumeration, the return value is
.
To get extended error information, call
GetLastWin32Error.