Geoff Chappell, Software Analyst
The SBDATA structure (formally tagSBDATA) holds what information that WIN32K.SYS—and before it, WINSRV.DLL—keeps about each of a window’s scrollbars.
The SBINFO structure for the window, as pointed to from the pSBInfo in the WND, has one SBDATA for each possible scrollbar, i.e., horizontal and vertical. All the information that is in each SBDATA is retrievable through the long-documented API functions GetScrollInfo (in version 3.51 and higher), GetScrollPos and GetScrollRange. Since version 3.51, these functions do not need an exchange with the server or a transition to kernel mode. Of course, setting the information in an SBDATA does. Again, all members of the structure can be changed through long-documented API functions: SetScrollInfo (in version 3.51 and higher), SetScrollPos and SetScrollRange.
The SBDATA is not documented. Though symbol files for WIN32K.SYS in Windows 8 and higher name the SBINFO in the C++ decorations of internal routines, type information for the structure is present only in symbol files for Windows 7—not before and not since.
The SBDATA is 0x10 bytes in all known versions of both 32-bit and 64-bit Windows, except that it is only 0x0C bytes in version 3.10.
Offset | Definition | Versions | Remarks |
---|---|---|---|
0x00 (3.10) |
INT pos; |
3.10 only | next at 0x0C |
0x04 (3.10); 0x00 |
INT posMin; |
all | |
0x08 (3.10); 0x04 |
INT posMax; |
all | |
0x08 |
INT page; |
3.51 and higher | |
0x0C |
INT pos; |
3.51 and higher | previously at 0x00 |
Perhaps version 3.51 moved pos from the beginning to the end just to put all members in the same order as the new API functions GetScrollInfo and SetScrollInfo use for the SCROLLINFO structure: posMin, posMax, page and pos correspond to that structure’s nMin, nMax, nPage and nPos.