General discussion

Locked

VB RegCreateKeyEx failures

By steve.calkin ·
Scenario:
Windows NT 4, VB 6.
User has access to Regedit and has no problems adding or modifying items to HKLM entries within registry.
VB code using Windows API (following ALL examples) returns a result of 5 (ERROR_CANT_WRITE?) for this user butworks for others! So far Nobody has been able to explain this or provide an answer (microsoft bug?). Can you?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB RegCreateKeyEx failures

by for_serge In reply to VB RegCreateKeyEx failure ...

As I understand, you use KEY_ALL_ACCESS value as desired security access parameter.
Please try to use the following expression instead: (KEY_READ Or KEY_WRITE).
You need to use the same value as security access mask for the RegOpenKeyEx function.
Serge

Collapse -

VB RegCreateKeyEx failures

by steve.calkin In reply to VB RegCreateKeyEx failure ...

Thanks Microsoft - once again the blindingly simple turns out to be a pain in the butt.
Why do they bother with a setting for ALL ACCESS if it doesn't really mean that!

Collapse -

VB RegCreateKeyEx failures

by steve.calkin In reply to VB RegCreateKeyEx failure ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums