|
// *********************************************************
// システムディレクトリのパスを取得
// 戻り値 : 取得した文字列の長さ
// 戻り値 : 失敗した場合は 0
// *********************************************************
int LboxInfo::SystemDirectory( LboxString *LString )
{
int ret;
UINT uRet;
uRet = GetSystemDirectory(
LString->szLboxString,
0
);
if ( uRet > (UINT)(LString->nLboxString) ) {
LString->Resize( uRet + 1 );
}
ret = (int)GetSystemDirectory(
LString->szLboxString,
(UINT)LString->nLboxString
);
return ret;
}
int LboxInfo::SystemDirectory( LPTSTR lpBuffer, int nSize )
{
int ret;
UINT uRet;
uRet = GetSystemDirectory(
lpBuffer,
0
);
if ( uRet > (UINT)nSize ) {
return 0;
}
ret = (int)GetSystemDirectory(
lpBuffer,
(UINT)nSize
);
return ret;
}
| |