If the window text is longer than (lLength-1) only the first (lLength-1) characters of window text are copied.

If the window is the frame window, the title bar window text is copied.

This function sends a WM_QUERYWINDOWPARAMS message to hwnd.

If this function references the window of another process, pun must be in memory that is shared by both processes, otherwise a memory fault can occur.

Note: Extreme caution must be used if this function is used to access an object window (that is, a window that is descended from HWND_OBJECT). This is because it is very possible that the thread that owns the object window might not be processing it's message queue, and if this is the case, a system halt could occur.