Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry

Status
Not open for further replies.

makaveliuk

Programmer
Dec 1, 2003
46
GB
I am using RegOpenKeyEx() to open a registry key and RegQueryValueEx to query the 4 values within it, it reads the first fine, but gives an Access Violation 0xC0000005 in MFC42UD.dll on the second value, it doesn't matter which order I read them in or if I close the key and re-open it between queries.

Any ideas what could be wrong?
 
I think you should update last parameter of RegQueryValue before each calling, because after each call this parameter changes. I think you should see in debugger how does this parameter change afetr first call, maybe first call is wrong.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top