Hello all. I have a question about the windows registry. I've been reading the MSDN on the registry functions and I was trying to learn how to use RegQueryValueEx. Here is the code I have to read the default value of HKEY_LOCAL_MACHINE:
The code compiled fine, but when I run it I get a windows system error and the process terminates. Can anyone explain why I may be getting this type of problem from this code?Code:#include <windows.h> #include <iostream> using namespace std; int main () { LPDWORD retType; LPBYTE retDat; RegQueryValueEx (HKEY_LOCAL_MACHINE, "", NULL, retType, retDat, (LPDWORD) 20); cout << retType; cout << retDat; return 0; }



LinkBack URL
About LinkBacks



