BSP_OpenFile, Unicode and C++
Hi guys,
Sorry if this has been posted on the forum, but I haven't found anything.
I'm developing an Android control app for bsplayer and I'm having trouble with BSP_OpenFile and unicode filenames. It works ok for ascii ones.
Here's the code I use:
int bsplayer_openFile(HWND bsp_hand, HWND bsremote_hwnd, bool fullscreen, wchar_t* filename)
{
COPYDATASTRUCT cds;
cds.dwData = BSP_OpenFile;
cds.lpData = (void *) filename;
// cds.cbData = (DWORD) strlen ((char *)cds.lpData)+1;
cds.cbData = (DWORD) (wcslen ((wchar_t *)cds.lpData))*sizeof(wchar_t)+2;
int result = SendMessage(bsp_hand, WM_COPYDATA, (WPARAM) bsremote_hwnd, (LPARAM)&cds);
}
BSplayer simply doesn't reacct, so probably I'm giving it data in the wrong format.
Could you help me with this?
|