BOOL SplitPathName(
PWSTR MyXbpathBuffer,
wstring& wdrive,
wstring& wdir,
wstring& wfname,
wstring& wext)//分割路径PWSTR MyXbpathBuffer
{
TCHAR drive[_MAX_DRIVE];
TCHAR dir[_MAX_DIR];
TCHAR fname[_MAX_FNAME];
TCHAR ext[_MAX_EXT];
errno_t err;
err = _wsplitpath_s(
MyXbpathBuffer,
drive,
_MAX_DRIVE,
dir,
_MAX_DIR,
fname,
_MAX_FNAME,
ext,
_MAX_EXT);
if (err != 0)
{
OutputDebugString(TEXT("IsFileSameName _wsplitpath_s Fail"));
return FALSE;
}
wdrive = drive;
wdir = dir;
wfname = fname;
wext = ext;
return TRUE;
}