Official BS.Player forums

Official BS.Player forums (http://forum.bsplayer.com/index.php)
-   General Talk And Support (http://forum.bsplayer.com/forumdisplay.php?f=8)
-   -   BSPlayer SDK question. (http://forum.bsplayer.com/showthread.php?t=12019)

Dead_ok 1st February 2011 12:46 PM

BSPlayer SDK question.
 
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

Ico-man 4th February 2011 11:34 AM

What are these functions supposed to do?

Dead_ok 8th February 2011 06:50 AM

COPYDATASTRUCT is a mapping for WinAPI's COPYDATASTRUCT structure (see msdn).
I fill it's fields the way described in your sdk (BSPlayer/sdk/bsp.h) to change player's skin. (or any other action that requires sending some data to your app)
and, as I described previously, SendMessage() always returns false.


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20