FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC space and diskinfo
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
space and diskinfo
Posted: Wed May 06, 2009 11:10 PM

How cal this function ?

HB_FUNC (MEMINFO)
{
MEMORYSTATUS st;
GlobalMemoryStatus (&st);

hb_reta (4);
hb_stornl ((ULONG) st.dwMemoryLoad, -1, 1);
hb_stornl ((ULONG) st.dwTotalPhys, -1, 2);
hb_stornl ((ULONG) st.dwTotalVirtual, -1, 3);
hb_stornl ((ULONG) st.dwAvailVirtual, -1, 4);
}

HB_FUNC (DISKINFO)
{
BOOL iRet;
unsigned __int64 iFreeBytesToCaller, iTotalBytes, iFreeBytes;

iRet = GetDiskFreeSpaceEx(NULL,
(PULARGE_INTEGER) &iFreeBytesToCaller,
(PULARGE_INTEGER) &iTotalBytes,
(PULARGE_INTEGER) &iFreeBytes);
hb_reta (2);
hb_stornl ((ULONG) iTotalBytes, -1, 1);
hb_stornl ((ULONG) iFreeBytes, -1, 2);
}

Best Regards, Saludos



Falconi Silvio
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: space and diskinfo
Posted: Thu May 07, 2009 04:50 AM

Silvio,

Those functions return arrays.

The first one returns a 4 elements array, and the second one a two elements array.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: space and diskinfo
Posted: Thu May 07, 2009 08:08 AM

How I can show all the informations ?

Best Regards, Saludos



Falconi Silvio
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: space and diskinfo
Posted: Thu May 07, 2009 09:40 AM

Silvio,

AEval( MemInfo(), { | n | MsgInfo( n ) } )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion