How about not wrapping the 3rd parameter? Instead of
new UINT((int)values[1])
do
(int)values[1]
题
I'm using JNative's method CallWindowProc
in my project and there's quite weird error occured with parameters. Could anyone suggest what's wrong?
My code:
User32.CallWindowProc(new LONG(hotkey.getPrevWndProc()),
new HWND((int)values[0]),
new UINT((int)values[1]),
new WPARAM((int)values[2]),
new LPARAM((int)values[3])).getValue();
And the error message (CallWindowProc
underlined):
The method CallWindowProc(LONG, HWND, int, WPARAM, LPARAM) in the type User32 is not applicable for the arguments (LONG, HWND, UINT, WPARAM, LPARAM)
Thx for advices :)
解决方案
How about not wrapping the 3rd parameter? Instead of
new UINT((int)values[1])
do
(int)values[1]