Delphi - salvapantallas en NT

 
Vista:

salvapantallas en NT

Publicado por Tino (18 intervenciones) el 11/09/2001 13:19:29
Hola de nuevo (sobre todo a Ernesto), mis jefes me han pedido que
mi aplicacion funcione en NT ,osea saber cuando salta el salvapantallas para restringir ciertas cosillas. El problema esta en que
en Nt no se puede hacer igual que para el 2000.Despues de mirar mucho he encontrado una pagina donde esplican como hacerlo pero
esta en c++ (creo) y me gustaria saber la forma de hacerlo en delphi..

LA PAGINA DICE ESTO:

SUMMARY
In Windows NT, you may find it useful to determine whether a screen saver is running on the system. On Windows NT 5.0 and greater, you can use the SystemParametersInfo API and specify the SPI_GETSCREENSAVERRUNNING flag to determine this.

In previous versions of Windows NT, there is no direct way to detect whether a screen saver is running on the system. However, there is an indirect approach to determine if a screen saver is running by testing for the existence of a desktop named "screen-saver" that the winlogon component of Windows NT creates for the screen saver to execute on. This desktop is created and destroyed when the screen saver is started and stopped.

Sample Code
/**
The following sample illustrates how to detect if a screen saver
is running on Windows NT. This sample works by checking for the
existence of a desktop named "screen-saver". This desktop is
created dynamically by winlogon when a screen saver needs to be
launched.
**/

#include <windows.h>
#include <stdio.h>

BOOL IsScreenSaverRunning( void );

int
__cdecl
main(
void
)
{
if(IsScreenSaverRunning()) {
printf("Screen saver is running!\n")%3
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder