-
September 10th, 2013, 03:24 AM
#1
Release Version problem
I wrote a program with configuration being written in the registry.
My debug version is working fine. But release version is not reading from the registry for some items.
So I enabled debugging in the release version. But in the release version when I press F10 it is skipping
some lines! My code for reading from registry follows.
Please help. I almost finished my code.
template<typename T>
void CEMapTasksT<T>::ReadValue(CRegKey& keyReg,LPCTSTR name,LPCTSTR strDef,CComBSTR& bsValue)
{
TCHAR value[VALUE_MAX_LEN] = {0};//When I press F10 here
ULONG nChars;
LONG retCode = keyReg.QueryStringValue(name,value,&nChars);
if(retCode != ERROR_SUCCESS)
{
lstrcpy(value,strDef);//code jumps to here
retCode = keyReg.SetStringValue(name,value);
}
if(retCode == ERROR_SUCCESS)
bsValue = value;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|