Correct mapping for SHChangeNotify in JNA
- by user389658
This is syntax for SHChangeNotify function from MSDN:
void SHChangeNotify(
LONG wEventId,
UINT uFlags,
__in_opt LPCVOID dwItem1,
__in_opt LPCVOID dwItem2
);
I've to write its Java counterpart in Java Native Access [JNA], but this declaration seems to be wrong:
public interface Shell32 extends com.sun.jna.platform.win32.Shell32 {
public Shell32 INSTANCE = (Shell32) Native.loadLibrary(Shell32.class);
void SHChangeNotify(long wEventId, int uFlags, Pointer dwItem1, Pointer dwItem2);
}
I got the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error
looking up function 'SHChangeNotify'
Any idea how to write it correctly?