There are a few freeware tools out there (e.g., Taskbar Shuffle, XNeat, etc.) which have the ability to change the order of the buttons on the taskbar, without actually closing or opening any windows. Unfortunately, none of them appears to be open-source.
What are the API calls required to change the order of buttons in the taskbar?