Problem in RegQueryValue.
-
I am using the
RegQueryValueEx()
Function to fethch the value from the reggistry I set previously. But getting porblem. It fetches only first charcter only.It Show the Corrent size of the Value but Fail to Fetch the Whole String.Previously I was using theRegQueryValue()
and It is working Fine :). But I need to use RegQueryValueEx() as I have to fetch Other valued in addition with default.:( The Code I am using is as follow.RegOpenKey(HKEY_CURRENT_USER,L"Software\\PersonalMenu",&hKey); Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,NULL,&size); BYTE *Data = new BYTE[size]; Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,(BYTE *)Data,&size);
I dont know what is the problem with it. If it is showing the Correct size of the Value don't it also show the Value. -
I am using the
RegQueryValueEx()
Function to fethch the value from the reggistry I set previously. But getting porblem. It fetches only first charcter only.It Show the Corrent size of the Value but Fail to Fetch the Whole String.Previously I was using theRegQueryValue()
and It is working Fine :). But I need to use RegQueryValueEx() as I have to fetch Other valued in addition with default.:( The Code I am using is as follow.RegOpenKey(HKEY_CURRENT_USER,L"Software\\PersonalMenu",&hKey); Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,NULL,&size); BYTE *Data = new BYTE[size]; Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,(BYTE *)Data,&size);
I dont know what is the problem with it. If it is showing the Correct size of the Value don't it also show the Value. -
I am using the
RegQueryValueEx()
Function to fethch the value from the reggistry I set previously. But getting porblem. It fetches only first charcter only.It Show the Corrent size of the Value but Fail to Fetch the Whole String.Previously I was using theRegQueryValue()
and It is working Fine :). But I need to use RegQueryValueEx() as I have to fetch Other valued in addition with default.:( The Code I am using is as follow.RegOpenKey(HKEY_CURRENT_USER,L"Software\\PersonalMenu",&hKey); Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,NULL,&size); BYTE *Data = new BYTE[size]; Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,(BYTE *)Data,&size);
I dont know what is the problem with it. If it is showing the Correct size of the Value don't it also show the Value.Are you getting a string value into a BYTE array? If so, how are you examining the string? Intellisense may only show you the first byte. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: