PDA

View Full Version : SystemParametersInfo problem



oBladeo1
03-02-2005, 03:38 AM
Does anyone know why this is returning 0?

#define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001

nvBufferSize = SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, 0, SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE );

//This is the vb function

SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0&, ByVal 0&, SPIF_SENDWININICHANGE Or SPIF_UPDATEINIFILE)

I just can't figure it out :confused:

anitabs
03-02-2005, 07:03 AM
SPI_SETFOREGROUNDLOCKTIMEOUT value is not supported in Windows NT and Windows 95

tyler5
07-11-2008, 08:28 AM
Instead of this in your InstallScript:

nvBufferSize = SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, 0, SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE );

I have this:

nvLock = 0;
nvBufferSize = SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nvLock, SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE );

And the function is successful. It returns 1 and changes the lock timeout.