An application that uses the operating system effectively should, at least, add its main window to the Window List when it starts, and remove it from the Window List when it stops.
Window List entries for non-OS/2 applications cannot be removed using this function. These entries are removed automatically by the system when the session they occupy terminates.
Note: This function and the WinCreateSwitchEntry and WinAddSwitchEntry functions are not required if the main window is created with the frame style FCF_TASKLIST or FCF_STANDARD, as these styles automatically update the Window List when the main window is created, destroyed, or its title changes.