Re: revise el sistema de ralentí
Posted: Tue Apr 29, 2014 7:59 pm
Hola Hasa e Javier, gracias por los comentarios, me alegro de que mi código fue útil.
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://mail.hmgforum.com/
http://www.pctoledo.com.br/forum/viewto ... 218#p88218Claudio Soto wrote:Un pequeño aporte,
no es necesario llamar en forma indirecta la función GetLastInputInfo:Code: Select all
#pragma BEGINDUMP #include "windows.h" #include "time.h" #include "hbapi.h" HB_FUNC( SYSIDLESECS ) { LASTINPUTINFO lpi; lpi.cbSize = sizeof (LASTINPUTINFO); GetLastInputInfo (&lpi); hb_retnd( ( DOUBLE ) ( GetTickCount() - lpi.dwTime ) / CLOCKS_PER_SEC ); } #pragma ENDDUMP