From your PNG it looks as you want to take the directory from sOutput.str(). I can't see what type sOutput is. You wrote that you get the path as const char*. So you have to convert it to TCHAR*. The easiest way to do this is to use CString, because it's construtor works with both: char* or wchar*:
TCHAR dwgdestinationpath[_MAX_PATH + 1];
CString csPath(sOutput.str()), csBackslash(_T("\\"));
if (csPath.Right(1) != csBackslash) // append '\' if required
csPath += csBackslash;
_tcscpy_s(dwgdestinationpath, _MAX_PATH, (LPCTSTR)csPath);
_tcscat_s(dwgdestinationpath, _MAX_PATH, fname);
Or just use CString everywhere to make it more readable:
CString dwgdestinationpath(sOutput.str()), csBackslash(_T("\\"));
if (dwgdestinationpath.Right(1) != csBackslash) // append '\' if required
dwgdestinationpath += csBackslash;
dwgdestinationpath += fname;
Thomas Brammer ● Software Developer ● imos AG ● LinkedIn ● 
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.