Month

General Review of the last 12 Months





Brief Information about the October 98 CSIG Meeting

General Review of the last 12 Months


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.


You can get the source code and the executable programs from links on C User Group: See Download below.

Sample Code:

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
	...........
    }

"Random Access" questions start at 7:30 Tuesday night.

SOURCE CODE

Source Code Files

For help, email me at b a r n o l d @ b l a s t . n e t
Back to C++ Main Page