/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <windows.h>

#include <jni.h>

JNIEXPORT void JNICALL Java_SetWall_setWallPaper(JNIEnv *cntx, jobject me, jstring fnm)
{
   const char *fnm2 = (*cntx)->GetStringUTFChars(cntx, fnm, 0);
   SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, (char *)fnm2, SPIF_UPDATEINIFILE);
}
