Is there a function I can call to obtain the up/down status of all mouse buttons at the time of the function call?

I'm attempting to use Win32 as a replacement of DirectInput, since DI will go bye bye soon.