ホーム » 2011 » 5月 » 11

日別アーカイブ: 2011/05/11

2011年5月
1234567
891011121314
15161718192021
22232425262728
293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,417 アクセス



FileWait(ar) ;

FileWait::FileWait (CArchive& ar)
{
 CFile* file = ar.GetFile() ;
 UINT flag = ar.IsStoring() ? CFile::modeWrite : CFile::modeRead ;
 CString filePath = file->GetFilePath() ;
 Init(filePath,flag) ;
 }
 ar.IsStoring の時,書込んでいる事をレジストリにマーク(Open_WriteMode)する.

FileWait::IsOpenedWrite により,この状態を判断できる.
実際これを利用しているのは MakeCMF.cpp と,PlnCtrl.exe .
BOOL MakeCacheMF::CanMakeMF (void)
{
 …
 BOOL canMake = TRUE ;
 if (!CheckInstall()) { canMake = FALSE ; }
 else if (FileWait::IsOpenedWrite()) { canMake = FALSE ; }
 else {  …  }
 if (!canMake) {
  CString stmsg = _T(“生成を中断しています.”) ;
  …
  }
 return canMake ;
 }

BOOL SleepOtherSaving (void) {
 …
 return FileWait::IsOpenedWrite() ;
 }

LRESULT CPlnctrlDlg::FindHandler(WPARAM param1, LPARAM param2) {
 …
 if (::SleepOtherSaving()) { return 0 ; }
 …
 }

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