All error message should show source of issues instead a dumb useless message. In general a better error logging that point at least to the function used in which dll would be a great progress.
As sample i add a message from amhooku. The error message is "Cannot write to the HKEY_LOCAL_MACHINE registry hive."
To know what happen a tool must used that logs all file and reg actions from amhook to know which is the key in question. The key here is "HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run".
The software should show already all details to solve the issue.