CRegKey QueryStringValue
-
I'm having difficulty using this method, specifically... lResult = reg.QueryStringValue("PathOut", regtext, sizeof(regtext)); It would be nice to see some examples using this CRegKey method or something. I can't seem to nail down the third parameter... "The size, in TCHARs, of the buffer pointed to by pszValue. When the method returns, pnChars contains the size, in TCHARs, of the string retrieved, including a terminating null character." TIA Ryan
-
I'm having difficulty using this method, specifically... lResult = reg.QueryStringValue("PathOut", regtext, sizeof(regtext)); It would be nice to see some examples using this CRegKey method or something. I can't seem to nail down the third parameter... "The size, in TCHARs, of the buffer pointed to by pszValue. When the method returns, pnChars contains the size, in TCHARs, of the string retrieved, including a terminating null character." TIA Ryan
TCHAR szBuffer[128];
DWORD dwSize = sizeof(szBuffer) / sizeof(TCHAR); // # of characters in the bufferlResult = reg.QueryStringValue ( _T("PathOut"), szBuffer, &dwSize );
// dwSize now holds the number of chars stored in szBuffer, +1 for
// the final null.--Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
TCHAR szBuffer[128];
DWORD dwSize = sizeof(szBuffer) / sizeof(TCHAR); // # of characters in the bufferlResult = reg.QueryStringValue ( _T("PathOut"), szBuffer, &dwSize );
// dwSize now holds the number of chars stored in szBuffer, +1 for
// the final null.--Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm