|
General Talk And Support General talk and peer-to-peer support about BS.Player and other video and audio multimedia players. |
| LinkBack | Thread Tools | Search this Thread | Display Modes |
| |||
BSP_OpenFile, Unicode and C++ 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? |
| |||
This works only for ASCII strings, not unicode: int bsplayer_openFile(HWND bsp_hand, HWND bsremote_hwnd, bool fullscreen, wchar_t* filename) { char* fff = (char*) calloc(1000, 1); size_t sizeRequired = WideCharToMultiByte( 950, 0, filename, -1, fff, 1000, NULL, NULL); COPYDATASTRUCT cds; cds.dwData = BSP_OpenFile; cds.lpData = (void *) fff; cds.cbData = (DWORD) sizeRequired +2; int result = SendMessage(bsp_hand, WM_COPYDATA, (WPARAM) bsremote_hwnd, (LPARAM)&cds); .. } |
| |||
I don't know if you actually need to forcedly call the SendMessageW function, but the problem can lay in BSplayer code. Only a BSplayer member can reply to this last statement, as for my suggestion in using SendMessageW... I'm not sure, not coding in C since a lot of time and never dealt with unicode strings before, sorry
__________________ BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer BSP Definitions Manager (v1.02) BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051) |
| |||
Quote:
|
| ||||
Support for BSP_OpenFileW will be added in next beta. Unicode should work then.
__________________ |Android translations | Technical help for PRO users | BS.Player-Subtitles.com | BSPeter's Help2Help | F. A. Q - Wiki | BSP Games |
| |||
Thank you very much for this addition
__________________ BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer BSP Definitions Manager (v1.02) BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051) |
| |||
Thanks, looking forward to the next release :D
|
| ||||
Next release (beta) just published: BSPlayer 2.59 beta is released!
__________________ Help2Help (click) BSplayer: simply the best & most versatile (Build 1072 Dutch language here!) When posting always mention your computer's OS and the version and build number(!) of BS.Player as used by you, as well as - if applicable and especially when encountering problems - the type(s) of the file(s) mentioned in your post. Private messages/Visitor messages are NOT for seeking personal help with respect to BS.Player! Instead use the forums! |
| |||
Quote:
Thanks! |
| |||
Hi guys! I finally got around to implementing unicode in bsremote and it works like a charm. Thanks a lot for responding to the request so quickly! When you have some more time on your hands , could you also add support in the API for unicode subtitles? Nobody asked for that yet, but I assume it will be needed at some point. Great work! |
Tags |
bspopenfile, unicode |
| |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Full Unicode support? | uly | Feature Requests, Feedback And Suggestions | 0 | 10th January 2007 12:05 PM |
QUERY: unicode support | kevingpo | Feature Requests, Feedback And Suggestions | 6 | 3rd December 2006 08:55 PM |
File with Unicode Char & Folder Handling | uncpotato | Bug Reports And Codecs | 0 | 24th June 2006 11:26 AM |
codes that change color of subtitles. and the unicode issue. | delikedi | General Talk And Support | 0 | 27th April 2005 08:47 AM |
subtitles under unicode or rtf format don't work | blueQ | Bug Reports And Codecs | 0 | 29th April 2004 09:37 PM |