win A pointer to the window. str Must be large enough to hold the character string fetched from the window.