space and diskinfo

space and diskinfo

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: space and diskinfo

Postby Antonio Linares » Thu May 07, 2009 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: space and diskinfo

Postby Silvio » Thu May 07, 2009 8:08 am

How I can show all the informations ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: space and diskinfo

Postby Antonio Linares » Thu May 07, 2009 9:40 am

Silvio,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 10 guests