CeGetWindowLong (RAPI)

Windows Mobile 6.5
A version of this page is also available for

This function retrieves information about the specified window on a remote Windows Embedded CE–based device. CeGetWindowLong also retrieves the 32-bit (long) value at the specified offset into the extra window memory of a window.

LONG CeGetWindowLong(
  HWND hWnd, 
  Int nIndex 


Handle to the window and, indirectly, the class to which the window belongs.


Specifies 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 four; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To retrieve any other value, specify one of the following values.

Values Description


Retrieves the extended window styles.


Retrieves the window styles.


Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure.


Not supported.


Not supported.

The following values are also available when the hWnd parameter identifies a dialog box.

Values Description


Retrieves the return value of a message processed in the dialog box procedure.


Retrieves extra information private to the application, such as handles or pointers.

The requested 32-bit value indicates success. Zero indicates failure. To get extended error information, call CeGetLastError and CeRapiGetError.

The nIndex parameter must be a multiple of 4 bytes.

Unaligned access is not supported.

Windows Embedded CEWindows CE 3.0 and later
Windows MobilePocket PC 2000 and later, Smartphone 2002 and later

Community Additions