First of all you can use QSettings to read from and write to the registry. Secondly, the DEVICEMAP is probably read-only and protected. To check, open the registry editor (regedit) and see if you can change values there manually.
If your software is about reading and writing from serial ports, you can have a look at the QtSerialPort module.