Use Hid_Device_Ptr alias instead of Ptr ()
Fix error handling.

Until now, all error messages were set to "Unknown error".