10 HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath,
size_t cchPath, PWSTR* ppszEnd,
11 size_t* pcchRemaining)
18 pszPathLength = _wcslen(pszPath);
20 if (pszPath[pszPathLength - 1] == CUR_PATH_SEPARATOR_CHR)
23 if (cchPath > (pszPathLength + 1))
25 pszPath[pszPathLength] = CUR_PATH_SEPARATOR_CHR;
26 pszPath[pszPathLength + 1] =
'\0';
31 return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
36 HRESULT PATH_CCH_ADD_SEPARATOR_EX(PSTR pszPath,
size_t cchPath, PSTR* ppszEnd,
37 size_t* pcchRemaining)
44 pszPathLength = strlen(pszPath);
46 if (pszPath[pszPathLength - 1] == CUR_PATH_SEPARATOR_CHR)
49 if (cchPath > (pszPathLength + 1))
51 pszPath[pszPathLength] = CUR_PATH_SEPARATOR_CHR;
52 pszPath[pszPathLength + 1] =
'\0';
57 return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);