Hello, everyone.
I am writing a Java library for controllin' BSP, using Java Native Access.
And I have some difficulties with sending WM_COPYDATA messages: when I send'em the only return from SendMessage I get is false, which means, something's wrong.
Sending WM_BSP_CMD messages is clear to me and Everything works fine.
Code I use to send WM_COPYDATA:
Code:
COPYDATASTRUCT cds = new COPYDATASTRUCT();
cds.dwData = new ULONG_PTR(BSP_SetSkin);
cds.lpData = ByteBuffer.wrap(skinName.getBytes());
cds.cbData = cds.lpData.limit();
LRESULT result = ExtendedUser32.INSTANCE.SendMessage(hWnd,
WM_COPYDATA, new WPARAM(0),
new LPARAM(Pointer.nativeValue(cds.getPointer())));
BSP version: 2.57.1015
OS: Windows 7
Java: jdk-6u22
Thanks in advance.
PS: ExtendedUser32 is my mapping interface to call functions from user32.dll