Registry Values Problm Plz hlp me
-
HI ,, I m Storing Value in Registry as String Value in Windows 2000 / XP its store string value without double qoutes"" as... value but in Window 98 it Save String Value with in qoutes... "value" then after query a value then i try to mathc it but there is missmatch in Windows 98 due to " .." . y any solution. thanx
-
HI ,, I m Storing Value in Registry as String Value in Windows 2000 / XP its store string value without double qoutes"" as... value but in Window 98 it Save String Value with in qoutes... "value" then after query a value then i try to mathc it but there is missmatch in Windows 98 due to " .." . y any solution. thanx
hian don't mind,i think you are wrong. i am working on registry i have never this problem which you stating. anyway what are using raw API's or CRegClass ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk
-
hian don't mind,i think you are wrong. i am working on registry i have never this problem which you stating. anyway what are using raw API's or CRegClass ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk
HI i m using CRegKey Class.... and its methods for query etc. Can u send me any code sampl ,, that can work on both win 98 and win 2000/ XP but if u see using regedit command too see registry values in windows 98 .. or 2000/ Xp. check there any registry value that is string value in win 98 its as "value" but in XP and 2000 its as value simply without qoutations"". thanx
-
hian don't mind,i think you are wrong. i am working on registry i have never this problem which you stating. anyway what are using raw API's or CRegClass ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk
I think the Problm in Query to the key here CRegKey reg; CString str = "cam"; BOOL bRetVal; CString strTmp = "Software\\NDT\\Fovea"; bRetVal = reg.Open (HKEY_LOCAL_MACHINE ,(LPCTSTR)strTmp ) ; if (bRetVal==ERROR_SUCCESS) { CString key = "Password"; char getValue[256] ; DWORD d; bRetVal=reg.QueryValue ( getValue , (LPCTSTR)key , &d); if (bRetVal==ERROR_SUCCESS) { AfxMessageBox(" Working fine"); CString check = (CString)getValue ; AfxMessageBox( "Value is ....||"+ check); if (str.Compare (check) == 0) { AfxMessageBox( "Same"); reg.Close (); } else { AfxMessageBox( "Not same"); reg.Close (); } } else AfxMessageBox(" Query Failed"); } else { AfxMessageBox( "Cannot Open"); reg.Close (); } It is messaging Query Failed..
-
hian don't mind,i think you are wrong. i am working on registry i have never this problem which you stating. anyway what are using raw API's or CRegClass ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk
I think the Problm in my Query to the key here CRegKey reg; CString str = "cam"; BOOL bRetVal; CString strTmp = "Software\\NDT\\Fovea"; bRetVal = reg.Open (HKEY_LOCAL_MACHINE ,(LPCTSTR)strTmp ) ; if (bRetVal==ERROR_SUCCESS) { CString key = "Password"; char getValue[256] ; DWORD d; bRetVal=reg.QueryValue ( getValue , (LPCTSTR)key , &d); if (bRetVal==ERROR_SUCCESS) { AfxMessageBox(" Working fine"); CString check = (CString)getValue ; AfxMessageBox( "Value is ....||"+ check); if (str.Compare (check) == 0) { AfxMessageBox( "Same"); reg.Close (); } else { AfxMessageBox( "Not same"); reg.Close (); } } else AfxMessageBox(" Query Failed"); } else { AfxMessageBox( "Cannot Open"); reg.Close (); } It is messaging Query Failed..
-
I think the Problm in my Query to the key here CRegKey reg; CString str = "cam"; BOOL bRetVal; CString strTmp = "Software\\NDT\\Fovea"; bRetVal = reg.Open (HKEY_LOCAL_MACHINE ,(LPCTSTR)strTmp ) ; if (bRetVal==ERROR_SUCCESS) { CString key = "Password"; char getValue[256] ; DWORD d; bRetVal=reg.QueryValue ( getValue , (LPCTSTR)key , &d); if (bRetVal==ERROR_SUCCESS) { AfxMessageBox(" Working fine"); CString check = (CString)getValue ; AfxMessageBox( "Value is ....||"+ check); if (str.Compare (check) == 0) { AfxMessageBox( "Same"); reg.Close (); } else { AfxMessageBox( "Not same"); reg.Close (); } } else AfxMessageBox(" Query Failed"); } else { AfxMessageBox( "Cannot Open"); reg.Close (); } It is messaging Query Failed..
Here is your Problem Zeeshan Bilal wrote: CString key = "Password"; char getValue[256] ; DWORD d; bRetVal=reg.QueryValue ( getValue , (LPCTSTR)key , &d); remeber one thing,QuerryValue Third Parameter containing values goes Both IN and Out so if you want to run your Program properly change DWORD d; to DWORD d=255;//one space for null character ->Basically when the function is Called, the DWORD value Must contain the buffer size of string (which is going in as Second parameter for fetching required Value). ->when function return it contain the value for Total data in second Parameter Return . ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk
-
HI i m using CRegKey Class.... and its methods for query etc. Can u send me any code sampl ,, that can work on both win 98 and win 2000/ XP but if u see using regedit command too see registry values in windows 98 .. or 2000/ Xp. check there any registry value that is string value in win 98 its as "value" but in XP and 2000 its as value simply without qoutations"". thanx
IS your Problem Solved :doh: ----------------------------- "I Think It will Work" Formerly I AM Known As "Alok The Programer" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk