ホーム » 2015 » 11月

月別アーカイブ: 11月 2015

2015年11月
1234567
891011121314
15161718192021
22232425262728
2930  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,214 アクセス



vector -> tstring

以前 MFC を使用した StringArrayToString を変更したが,今回は STL 版.


tstring String_Join (const std::vector<tstring>& srcAry,LPCTSTR sp)
{
  tstring str ;
  for (size_t index= 0 ; index<srcAry.size() ; index++) {
    str += srcAry[index] ;
    if (index+1 == srcAry.size()) { continue ; }
    str += sp ;
    }
  return str ;
  }
MFC 版は VC 6 までだったが,STL 版では VC 7 も遅い.


tstring String_Join (const std::vector<tstring>& srcAry,LPCTSTR sp)
{
  tstring str ;
  v_tstring tmpSA ;
  tstring tmpStr ;
  for (size_t index= 0 ; index<srcAry.size() ; index++) {
    tmpStr += srcAry[index] ;
    if (index+1 == srcAry.size()) { continue ; }
    if ((index%128) == 100) {
      tmpSA.push_back(tmpStr) ;
      tmpStr.erase() ;
      continue ;
      }
    tmpStr += sp ;
    }
  if (!tmpStr.empty()) {
    tmpSA.push_back(tmpStr) ;
    }
  if (tmpSA.size() > 1) {
    str = ::String_Join(tmpSA,sp) ;
    }
  else if (tmpSA.size() == 1) {
    str = tmpSA[0] ;
    }
  return str ;
  }

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Shell Extension のデバッグ

Shell Extension で,縮小版の背景に GDI+ を使用して,どうも動作が安定しなくなった.
現象としては,環境によるが explorer.exe が「応答なし」に.
  GDI+ の GdiplusShutdown の呼び方が悪かったみたいで,DllCanUnloadNow で終わらせる様にした.
また,今回デバッグ用にダンプする様にしていて,そのファイルをエクスプローラで選択しようとするとフリーズ.
  これは,デフォルトでは出力しないことで回避.


今回これらをやっていて,以前から面倒と思っていた ShellExt.dll のデバッグ.
デバッグ版.dll が呼ばれる様に設定して,普通の exe で「開く」ダイアログで dll 内をデバッグできる.


Vector
http://mish.work/joomla/i-tools.html

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

VC include lib のパス

VC 6
  HKCU\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Directories
VC 7 , 7.1 , 8 , 9
  C:\Users\Iwao\AppData\Local\Microsoft\VisualStudio\…\VCComponents.dat
VC 10 , 11 , 12
  C:\Users\Iwao\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp. … .user.props

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

フォルダ以下の同期

先日追加した WD Cloud にソースなどをバックアップしたいと思い探していたら,robocopy.exe を見つけた.
まだ,単純にバックアップをとっているだけ.
  robocopy \\DevXP\C_Drive\Temp\ \\WDCloud\Backup\Develop\DevXP\Temp\ /mir
UNICODE のフォルダやファイル名も,コピー中の表示は ‘?’ となるが問題なさそう.


GUI 版の RichCopy があるみたいだが,こっちはまだ未確認.
FTP もいける?


robocopy 補助ツール
robocopy 補助ツール

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.