A Device Attached to the System is Not Functioning

is very common error

triggered while copying files from iPhone to PC

To solve this problem

Go to iPhone Settings > Photos

Scroll down >

select keep originals under TRANSFER TO MAC OR PC

reconnect iPhone to PC and you'll be able to copy files sucessfully