|
// *********************************************************
// 文字列値の取得
// *********************************************************
BOOL LboxReg::GetStrValue(LPCTSTR lpEntry, LboxString &LString)
{
return(LboxReg::GetStrValue(lpEntry, &LString));
}
BOOL LboxReg::GetStrValue(LPCTSTR lpEntry, LboxString *LString)
{
DWORD nType,nSize;
LONG nRet;
nSize = LString->nLboxString;
nRet = RegQueryValueEx(
LboxReg::hKey,
lpEntry,
NULL,
&nType,
(LPBYTE)(LString->szLboxString),
&nSize
);
if ( nRet == ERROR_SUCCESS ) {
return TRUE;
}
else {
if ( nRet == ERROR_MORE_DATA ) {
LString->Resize( nSize );
nRet = RegQueryValueEx(
LboxReg::hKey,
lpEntry,
NULL,
&nType,
(LPBYTE)(LString->szLboxString),
&nSize
);
if ( nRet == ERROR_SUCCESS ) {
return TRUE;
}
else {
return FALSE;
}
}
else {
return FALSE;
}
}
}
| |