I only started to experiment with JNA, and stuck trying to call this function w/o exception
Native prototype:
BOOL WINAPI SystemParametersInfo(
__in UINT uiAction,
__in UINT uiParam,
__inout PVOID pvParam,
__in UINT fWinIni
);
I've suggested such JNA equivalent:
public interface User32 extends StdCallLibrary {
User32 INSTANCE = (User32) Native.loadLibrary("user32", User32.class);
boolean SystemParametersInfo(
UINT_PTR uiAction,
UINT_PTR uiParam,
Pointer pvParam,
UINT_PTR fWinIni
);
public static final int SPI_GETCLEARTYPE = 0x1048;
public static final int SPI_GETDESKWALLPAPER = 0x0073;
}
And the question is how to call it with different pvParam types using pointer?
for example SPI_GETCLEARTYPE (where it's BOOL) and SPI_GETDESKWALLPAPER (where it's char[])