I already have a WH_MOUSE_LL hook in my application, but need a different behavior for Mouse and Touchpad.
I know about Raw Input API, but have no idea how to use it
You could use Raw Input to register for devices that you are interested to receive input from if you want to receive input for only the Touchpad, the Mouse, or both. You just need to register to receive input from the devices of your interest using the RegisterRawInputDevices function. this Microsoft docs example explains how to do this for a mouse and keyboard. Listening for Touchpad input would require a similar approach. you would use page 0x0D and usage 0x05. As for using this API with hooks, the AbsoluteTouchEx repository could provide some guidance on how to do this.