Correct mapping for SHChangeNotify in JNA
Posted
by
user389658
on Stack Overflow
See other posts from Stack Overflow
or by user389658
Published on 2011-12-01T09:47:28Z
Indexed on
2011/12/01
9:49 UTC
Read the original article
Hit count: 424
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?
© Stack Overflow or respective owner