|
// *********************************************************
// リストボックスに環境変数の一覧を追加
// 戻り値 : 無し
// *********************************************************
void LboxEnumEnvironment( HWND hList, int nIndex )
{
LPTSTR lpHandle;
LPTSTR lpWork;
lpHandle = GetEnvironmentStrings();
lpWork = lpHandle;
while( 1 ) {
if ( (*lpWork) != 0x00 ) {
if ( (*lpWork) == '=' ) {
lpWork += lstrlen( lpWork ) + 1;
continue;
}
LboxListInsert( hList, nIndex, lpWork );
nIndex++;
lpWork += lstrlen( lpWork ) + 1;
continue;
}
break;
}
FreeEnvironmentStrings( lpHandle );
}
| |