home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
distrib.akp.su/Programming/Vb-6+Rus/
/
distrib.akp.su.tar
/
distrib.akp.su
/
Programming
/
Vb-6+Rus
/
COMMON
/
MSDEV98
/
BIN
/
IDE
/
SYSINFO.DLL
/
TEMPLATE
/
134
Wrap
Text File
|
1998-06-18
|
1KB
|
45 lines
$$IF:NewFunc$$
CDialog::OnInitDialog(); // CG: This was added by System Info Component.
$$ENDIF$$
// CG: Following block was added by System Info Component.
{
CString strFreeDiskSpace;
CString strFreeMemory;
CString strFmt;
// Fill available memory
MEMORYSTATUS MemStat;
MemStat.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&MemStat);
strFmt.LoadString($$VAL:PhysicalMemory$$);
strFreeMemory.Format(strFmt, MemStat.dwTotalPhys / 1024L);
//TODO: Add a static control to your About Box to receive the memory
// information. Initialize the control with code like this:
// SetDlgItemText(IDC_PHYSICAL_MEM, strFreeMemory);
// Fill disk free information
struct _diskfree_t diskfree;
int nDrive = _getdrive(); // use current default drive
if (_getdiskfree(nDrive, &diskfree) == 0)
{
strFmt.LoadString($$VAL:DiskSpace$$);
strFreeDiskSpace.Format(strFmt,
(DWORD)diskfree.avail_clusters *
(DWORD)diskfree.sectors_per_cluster *
(DWORD)diskfree.bytes_per_sector / (DWORD)1024L,
nDrive-1 + _T('A'));
}
else
strFreeDiskSpace.LoadString($$VAL:SpaceUnavailable$$);
//TODO: Add a static control to your About Box to receive the memory
// information. Initialize the control with code like this:
// SetDlgItemText(IDC_DISK_SPACE, strFreeDiskSpace);
}
$$IF:NewFunc$$
return TRUE; // CG: This was added by System Info Component.
$$ENDIF$$