For this month's meeting we will have a review of the material covered during the last year. I will point out some of the more interesting problems and concepts that were demonstrated as well as answer questions. In some cases, we will have discussions and/or debates on possible alternatives.
"Random Access" questions start at 7:30 Tuesday night. See you there.
UINT SearchThread( LPVOID pParam) // Controlling function -- WORKER THREAD
{
CDsizWDlg *mDlg = (CDsizWDlg *) pParam;
mDlg->PostMessage(WM_MYMOUSEUPDATE,TRUE);
mDlg->m_progress.SetPos(0);
mDlg->m_progress.ShowWindow(SW_SHOW);
mDlg->m_progress.SetStep(1);
process( 3, mDlg->m_cmds, mDlg);
mDlg->m_progress.ShowWindow(SW_HIDE);
mDlg->PostMessage(WM_MYMOUSEUPDATE,FALSE);
mDlg->m_Act.SetWindowText(" ");
return 0;
}
int process(int argc, char *argv[], CDsizWDlg *myDialog)
{
char root[_MAX_PATH] = "\\", mytime[20], mydate[20], estimated[20]="";
char info[_MAX_PATH];
if (argc==1) { puts(VERSION); return 1; }
Tsize=Gsize=gFileCount=gFolderCount=gCluster=0L;
pDlg = myDialog;
_strdate(mydate); _strtime(mytime);
strcpy(info,pDlg->m_NetworkPath);
CDiskInfo Homedrive; // save startup info
CPathInfo Target(argv[1]); // parse command line argument
// Attempt to change to new drive and check that is was successful.
//
if (Target.DKnumber <= 26) _chdrive(Target.DKnumber); // 1=A, 2=B, ...
if (Target.DKnumber != _getdrive())
{ puts("+++ Disk Selection Error +++\007"); return 2; }
if (*Target.dir) strcpy(root,Target.dir); // adjust root starting point
CDiskInfo *Newdrive = new CDiskInfo(); // store info about new drive
gCluster = Newdrive->Cluster; // save value in global varable
// cluster information is not accurate over microsoft networks.
if (Newdrive->drive_type==DRIVE_REMOTE)
{
gCluster = 4096; // save value in global varable
strcpy(estimated," estimated");
}
search(root); // Do a RECURSIVE file search
...........
}