View Single Post
  #3 (permalink)  
Old 22nd September 2011
apophys apophys is offline
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 39
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Default

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);

..

}
Reply With Quote
 

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