Changeset 36611 in vbox for trunk/src/VBox/Runtime/r3/win/path-win.cpp
- Timestamp:
- Apr 7, 2011 10:35:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/path-win.cpp
r34003 r36611 179 179 */ 180 180 return RTUtf16ToUtf8Ex(&wszPath[0], RTSTR_MAX, &pszPath, cchPath, NULL); 181 } 182 183 RTDECL(int) RTPathUserDocuments(char *pszPath, size_t cchPath) 184 { 185 /* 186 * Validate input 187 */ 188 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); 189 AssertReturn(cchPath, VERR_INVALID_PARAMETER); 190 191 RTUTF16 wszPath[RTPATH_MAX]; 192 HRESULT rc = SHGetFolderPath(0, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, wszPath); 193 if ( rc == S_OK /* Found */ 194 || rc == S_FALSE) /* Found, but doesn't exists */ 195 /* 196 * Convert and return. 197 */ 198 return RTUtf16ToUtf8Ex(&wszPath[0], RTSTR_MAX, &pszPath, cchPath, NULL); 199 200 return VERR_PATH_NOT_FOUND; 181 201 } 182 202
Note:
See TracChangeset
for help on using the changeset viewer.