class LboxInfo


  WindowsDirectory



  
// *********************************************************
// Windows ディレクトリのパスを取得
// 戻り値 : 取得した文字列の長さ
// 戻り値 : 失敗した場合は 0
// *********************************************************
int LboxInfo::WindowsDirectory( LboxString *LString )
{
	UINT nLen;

	while( 1 ) {
		nLen = GetWindowsDirectory(
			LString->szLboxString,
			(UINT)(LString->nLboxString)
		);
		if ( nLen == 0 ) {
			return 0;
		}
		if ( (int)nLen >= (int)(LString->nLboxString) - 2 ) {
			if ( LString->nLboxString > LBOX_STRINGMAX ) {
				break;
			}
			LString->Resize( LString->nLboxString + MAX_PATH );
			continue;
		}
		break;
	}
	return (int)nLen;
}
int LboxInfo::WindowsDirectory( LPTSTR lpBuffer, int nSize )
{
	int ret;
	UINT uRet;

	uRet = GetWindowsDirectory(
		lpBuffer,
		0
	);
	if ( uRet > (UINT)nSize ) {
		return 0;
	}

	ret = (int)GetWindowsDirectory(
		lpBuffer,
		(UINT)nSize
	);

	return ret;
}
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ