Canonically, PVOID is com.sun.jna.Pointer.
IntByReference iref = new IntByReference();
SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, iref.getPointer(),
0);
boolean running = iref.getValue() != 0;
On Nov 13, 2007, at 8:58 AM, Gabriel Rossetti wrote:
Hello,
I am trying to map this :
http://msdn2.microsoft.com/en-us/library/ms724947.aspx
BOOL WINAPI SystemParametersInfo( __in UINT uiAction, __in UINT
uiParam, __inout PVOID pvParam, __in UINT fWinIni ); and I'm having
some problems. I get an exception and it's a bit hard to know what
param is wrong. I tried to do this :
public boolean SystemParametersInfo(int uiAction, int uiParam,
boolean pvParam, int fWinIni);
and this
ublic boolean SystemParametersInfo(int uiAction, int uiParam,
PointerType pvParam, int fWinIni);
but neither work. I call the Mapped function like so (the boolean
version):
...
boolean running = false;
User32.INSTANCE.SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0,
running, 0);
return running != false;
Could someone please help? I couldn't find out how to map the PVOID
(*void?), but it may be another thing.