error al compilar

error al compilar

Postby MANOLO » Tue Jun 17, 2008 10:21 am

Hola al compilar la tsysteminfo, me el error

Code: Select all  Expand view
#ifdef __HARBOUR__
   #pragma BEGINDUMP
      #include "windows.h"

   nRetu := HB_INLINE( nMem ); ------ aqui me da el error
   {
      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 ) ;
      }
   }
   #pragma ENDDUMP


el error que me da es:
Error E2141 C:\\FACTU32\\SOURCE\\ERRSYSW.PRG 1282: Declaration syntax error
Error E2040 C:\\FACTU32\\SOURCE\\ERRSYSW.PRG 1283: Declaration terminated incorrectly

He probado a quitar el ";" pero entonces me da más errores.

Gracias.
MANOLO
 
Posts: 87
Joined: Sun Oct 09, 2005 8:49 pm
Location: Spain

Postby Antonio Linares » Tue Jun 17, 2008 11:29 am

Prueba a añadir #include "hbapi.h" despues de #include "windows.h"

En caso de que no te funcione, lo mas facil es que lo transformes a una función HB_FUNC().
regards, saludos

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 15 guests