Well as the topic might have revealed I'm in need of getting the file name of the temporary file in the unfinished folder that is currently selected by the user. I also need the path to the unfinished folder.
What I want to do is add a function that lets the user right click on any file and choose "Stream in VLC", which opens the temporary file in VLC. What I've got this far is the following code:
Code: Select all
LRESULT TransferView::onStream(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
int i = -1;
while( ( i = ctrlTransfers.GetNextItem(i, LVNI_SELECTED) ) != -1)
ItemInfo* itemInfo = ctrlTransfers.getItemData(i);
tstring filePath = itemInfo->getText(COLUMN_PATH);
tstring fileName = itemInfo->getText(COLUMN_FILE);
tstring str = _T("\"c:\\Program Files\\VideoLAN\\VLC\\vlc.exe\" \"");
str += filePath;
str += fileName;
str += _T("\"");
LPCTSTR p = str.c_str();
Now I know I shouldn't hard code the path to VLC or ever hard code that VLC has to be used here, but I'm still in a very early phase here so try to look past that. The message box is just for simple debugging, I wanted to se exactly what I was sending into _wsystem() function.
The main issue here is that filePath and fileName contains the path and name of the soon to be finished file, but that is not what I want. What I want is the unfinished path and the name of the temporary file in it so that I can stream it while it is downloading. I have searched for it but to be honest I really don't even know where to look so if someone could just give med a hint or something I would really appreciate it.