5 messages in net.java.dev.jna.users[jna-users] Trouble getting started w...
FromSent OnAttachments
David HampsteadSep 1, 2008 2:16 pm 
Michael Brewer-DavisSep 2, 2008 8:28 am 
David HampsteadSep 2, 2008 10:15 am.java, .java
Michael Brewer-DavisSep 2, 2008 10:38 am 
David HampsteadSep 2, 2008 11:02 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] Trouble getting started with window enumerationActions...
From:David Hampstead (dave@yahoo.co.uk)
Date:Sep 1, 2008 2:16:02 pm
List:net.java.dev.jna.users

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) {