According to the documentation for SystemParametersInfo - "To retrieve the current setting, call GetSystemMetrics with the SM_SWAPBUTTON flag". GetSystemMetrics function
SM_SWAPBUTTON
23 Nonzero if the meanings of the left and right mouse buttons are swapped; otherwise, 0.