Estoy recompilando una aplicacion existente que en la version 7.05 no generaba ningun problema al compilar la clase TSysInfo me genera los siguientes errores :
Harbour devel build 1.1-1 Intl.
Copyright 1999-2007, http://www.harbour-project.org/
Compiling 'c:\VENDELOT\tsysinfo.prg'...
c:\VENDELOT\tsysinfo.prg(721) Error E0020 Incomplete statement or unbalanced delimiters
c:\VENDELOT\tsysinfo.prg(726) Error E0030 Syntax error: "syntax error at 'MST'"
c:\VENDELOT\tsysinfo.prg(727) Error E0020 Incomplete statement or unbalanced delimiters
c:\VENDELOT\tsysinfo.prg(735) Error E0046 CASE or OTHERWISE does not match DO CASE
c:\VENDELOT\tsysinfo.prg(736) Error E0030 Syntax error: "syntax error at '}'"
5 errors
en el siguiente metodo
METHOD Memory( nMem ) Class TSystemInfo
Local nRetu
#ifdef __HARBOUR__
#pragma BEGINDUMP
#include "windows.h"
#pragma ENDDUMP
nRetu := HB_INLINE( nMem )
{
MEMORYSTATUS mst;
long nMem = hb_parnl(1);
mst.dwLength = sizeof( MEMORYSTATUS );
GlobalMemoryStatus( &mst );
switch( nMem )
{
case 1: hb_retnl( mst.dwTotalPhys / (1024*1024) ) ; break;
case 2: hb_retnl( mst.dwAvailPhys / (1024*1024) ) ; break;
case 3: hb_retnl( mst.dwTotalPageFile / (1024*1024) ) ; break;
case 4: hb_retnl( mst.dwAvailPageFile / (1024*1024) ) ; break;
case 5: hb_retnl( mst.dwTotalVirtual / (1024*1024) ) ; break;
case 6: hb_retnl( mst.dwAvailVirtual / (1024*1024) ) ; break;
default: hb_retnl( 0 ) ;
}
}
#else
Local oMemory
Struct oMemory
Member m1 As LONG // nSize
Member m2 As LONG // Memory Load
Member m3 As LONG // Total Physical
Member m4 As LONG // Available Physical
Member m5 As LONG // Total Page File
Member m6 As LONG // Available Page File
Member m7 As LONG // Total Virtual
Member m8 As LONG // Available Virtual
EndStruct
oMemory:m1 := oMemory:sizeOf()
MemStat( oMemory:cBuffer )
Do Case
Case nMem == 1 ; nRetu := Round( oMemory:m3 / ( 1024 * 1024 ), 0 )
Case nMem == 2 ; nRetu := Round( oMemory:m4 / ( 1024 * 1024 ), 0 )
Case nMem == 3 ; nRetu := Round( oMemory:m5 / ( 1024 * 1024 ), 0 )
Case nMem == 4 ; nRetu := Round( oMemory:m6 / ( 1024 * 1024 ), 0 )
Case nMem == 5 ; nRetu := Round( oMemory:m7 / ( 1024 * 1024 ), 0 )
Case nMem == 6 ; nRetu := Round( oMemory:m8 / ( 1024 * 1024 ), 0 )
Otherwise ; nRetu := 0
EndCase
If nRetu # 0 .and. ::nPlatform == 1 // added by lkm
nRetu += 1 // calc error under Win95/98/ME
Endif
#endif
Return nRetu
Agradezco cualquier Informacion al respecto para solucionar el problema.
Muchas Gracias.