|
From: Ben M. <ili...@at...> - 2008-01-24 17:38:01
|
Hello all. I recently looked up usage of registry functions to use the
Windows registry to automatically start a program. I decided to make
some test applications to practice using them. This is the code I have
to get the default value of registry key HKEY_LOCAL_MACHINE:
#include <windows.h>
#include <iostream>
using namespace std;
int main ()
{
LPDWORD retType;
LPBYTE retDat;
RegQueryValueEx (HKEY_LOCAL_MACHINE,
"",
NULL,
retType,
retDat,
20);
cout << retType;
cout << retDat;
return 0;
}
This program compiles fine, but when i run it windows terminates it with
an error message. If anyone would like to see the error message, i can
get it. If anyone can possibly come up with an explanation as to why I'm
coming up with a system error, please help!
|