User32GetWindowLong(IntPtr, WindowLongValues) Method

Note: This API is now obsolete.
Retrieves information about the specified window.

The function also retrieves the 32-bit (DWORD) value at the specified offset into the extra window memory.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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)]
[ObsoleteAttribute("Call GetWindowLongPtr instead.", false)]
public static uint GetWindowLong(
	IntPtr hWnd,
	WindowLongValues flags
)

Parameters

hWnd  IntPtr
A handle to the window and, indirectly, the class to which the window belongs.
flags  WindowLongValues
The zero-based offset to the value to be retrieved.

Valid values are in the range zero through the number of bytes of extra window memory, minus the size of an integer.

Return Value

UInt32
If the function succeeds, the return value is the requested value.

If the function fails, the return value is zero.

If SetWindowLong(IntPtr, WindowLongValues, UInt32) has not been called previously, GetWindowLong(IntPtr, WindowLongValues) returns zero for values in the extra window or class memory.

To get extended error information, call GetLastWin32Error.

Remarks

See Also