Hi,
I have one final question about doing stuff with the registry. I was trying to use the "RegQueryValueEx" function to get a value from the registry, but I can't seem to get it to work. Everything compiles just fine, however when I run I get a dialog box "Unhandled exception at 0x77dd7904 in Program_Name.exe: 0xC0000005: Access violation reading location 0x000000c8." I'm pretty sure the error is in how I'm trying to save the data, but nothing I try works. Here's what I did:
Code:
BYTE lb;
RegQueryValueExA(phKey, "password", NULL, NULL, &lb, (LPDWORD)200/*wasn't sure what to put here...*/);
I'm pretty sure the "&lb" part is what is causing the problem, however since I've never used the "LPBYTE" type before maybe it's not (why couldn't they just stick to using char arrays?). All of the keys and values exist, and even if they didn't it still shouldn't give me an error like this. Can anyone help? Thanks.