Hello DaniWeb. ;)
I have a problem with char->tchar conversion, that i cant seem to solve. I want to launch another program, anh the relative path to that program is fetched from MYSQL.
updateBox = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG2), hWnd, updateDiag);
hThread = (HANDLE)_beginthreadex(NULL, 0, Blah::Start, NULL, NULL, NULL);
_stprintf(patcherLoc, _T("%s/Patcher %s.exe"), UPDATE_DIR, row[2]);
strcpy(patcherUrl, row[3]);
I have tried like anything i could find on google, fx MultiByteToWideChar() - i even gone as far as to write it to a char, write the char to a file, read, and then in tchar format, from the file.
The TCHAR just contains some chineese symbols, and the only readable being "/Patcher" and ".exe".
It really just needs to be LPCTSTR-readable, so my ShellExecute will work.
MessageBox(hWnd, patcherLoc, _T("Error"), MB_OK | MB_ICONEXCLAMATION);
ShellExecute(NULL, NULL, patcherLoc, NULL, NULL, SW_SHOWNORMAL);
I use the messagebox to monitor how my TCHAR is doing.
I hope anyone can help me solve this problem.
Cheers :)