LuisEnrique
Programmer
Hello Everybody ok, here is my code:
HKEY keyHandle;
char *rgValue = NULL;
PLONG buffLen = NULL;
if(RegOpenKey( HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion",
&keyHandle) == ERROR_SUCCESS)
{
//MessageBox(_T("Key was opened");
RegQueryValue(keyHandle, "MediaPath", rgValue, buffLen );
MessageBox(rgValue);
}
What I want to do is to query the registry value of MediaPath and store it in the rgValue variable. I looked at it in MSDN and I did exactly that it says. I tryed a couple of times and nothing is being saved in rgValue. Have you guys had this problem before. What should I do? Am I missing something? Any anwer is more than welcome.
Have a good day,
HKEY keyHandle;
char *rgValue = NULL;
PLONG buffLen = NULL;
if(RegOpenKey( HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion",
&keyHandle) == ERROR_SUCCESS)
{
//MessageBox(_T("Key was opened");
RegQueryValue(keyHandle, "MediaPath", rgValue, buffLen );
MessageBox(rgValue);
}
What I want to do is to query the registry value of MediaPath and store it in the rgValue variable. I looked at it in MSDN and I did exactly that it says. I tryed a couple of times and nothing is being saved in rgValue. Have you guys had this problem before. What should I do? Am I missing something? Any anwer is more than welcome.
Have a good day,