1 message in net.java.dev.jna.usersFeature Request: public Pointer(long ...
FromSent OnAttachments
rzoNov 19, 2007 12:28 pm 
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:Feature Request: public Pointer(long peer)Actions...
From:rzo (rz@gmx.de)
Date:Nov 19, 2007 12:28:55 pm
List:net.java.dev.jna.users

Hello,

the constructor Pointer(long peer) is not public. Could you pls set it to public.

I have the following issue:

I am receiving messages through a callback function. The function definition requires an int (LPARAM), which is sometimes interpreted as int sometimes as a window handle.

LRESULT CALLBACK HookProc(

int nCode, WPARAM wParam, LPARAM lParam );

But

HWND hWnd = new Pointer(lParam)

is currently not possible. I tried to define LPARAM as UNION, so that I could interpret it as int or
Pointer, but this does not seem to work. It always returns null. To get my program to work I patched Pointer. I would be regretful if you could
include this in the distribution.

The reverse function , long Pointer.getPeer(), would also be very helpful. In https://jna.dev.java.net/issues/show_bug.cgi?id=43 you indicate how to get
around this. Which worked for me. However Pointer.getPeer() would make life easier.

- Ron