Hi There,
I have managed to get the window enumeration example working from the project
homepage and the result in the console is something like this:
Found window native@0x1008e, total 1
Found window native@0x304fc, total 2
Found window native@0x1058e, total 3
Found window native@0x1008c, total 4
Found window native@0xc0df8, total 5
Found window native@0x10c9c, total 6
all the way up to 500+. I'm just wondering is there any way to actually get the
actual name of the windows that are open from the Pointer?
Also I'm not sure what I'm supposed to do with the original c declarations. I
have them commented out in the test class I am using.
importcom.sun.jna.Pointer;public
What are these for? Where do they go???? The class will not compile with them
present
// Original C declarations//typedef int (__stdcall
*WNDENUMPROC)(void*,void*);//int __stdcall EnumWindows(WNDENUMPROC,void*);
User32 user32 = User32.
user32.EnumWindows(
System.
}
}, INSTANCE;newUser32.WNDENUMPROC() {intcount;publicbooleancallback(Pointer
hWnd, Pointer userData) {out.println("Found window "+ hWnd + ", total "+
++count);returntrue;null);
}
Any help would be greatly appreciated!
Best regards
DavidclassTest {publicstaticvoidmain(String[] args) {