Changeset 36611 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Apr 7, 2011 10:35:29 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71059
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r36607 r36611 611 611 r3/posix/path2-posix.cpp \ 612 612 r3/posix/pathhost-posix.cpp \ 613 r3/posix/RTPathUserDocuments-posix.cpp \ 613 614 r3/posix/pipe-posix.cpp \ 614 615 r3/posix/poll-posix.cpp \ … … 699 700 r3/posix/path2-posix.cpp \ 700 701 r3/posix/pathhost-posix.cpp \ 702 r3/posix/RTPathUserDocuments-posix.cpp \ 701 703 r3/posix/process-posix.cpp \ 702 704 r3/posix/process-creation-posix.cpp \ … … 734 736 r3/darwin/sched-darwin.cpp \ 735 737 r3/darwin/time-darwin.cpp \ 738 r3/darwin/RTPathUserDocuments-darwin.cpp \ 736 739 r3/posix/RTFileQueryFsSizes-posix.cpp \ 737 740 r3/posix/RTHandleGetStandard-posix.cpp \ … … 809 812 r3/posix/path2-posix.cpp \ 810 813 r3/posix/pathhost-posix.cpp \ 814 r3/posix/RTPathUserDocuments-posix.cpp \ 811 815 r3/posix/pipe-posix.cpp \ 812 816 r3/posix/poll-posix.cpp \ … … 863 867 r3/posix/path2-posix.cpp \ 864 868 r3/posix/pathhost-posix.cpp \ 869 r3/posix/RTPathUserDocuments-posix.cpp \ 865 870 r3/posix/pipe-posix.cpp \ 866 871 r3/posix/poll-posix.cpp \ … … 951 956 r3/posix/path-posix.cpp \ 952 957 r3/posix/path2-posix.cpp \ 958 r3/posix/RTPathUserDocuments-posix.cpp \ 953 959 r3/posix/rand-posix.cpp \ 954 960 r3/posix/time-posix.cpp \ … … 1255 1261 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \ 1256 1262 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib 1257 VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation - install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib1263 VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -framework CoreServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib 1258 1264 ifdef VBOX_USE_VCC80 1259 1265 VBoxRT_LDFLAGS.win = /MANIFEST -
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 -
trunk/src/VBox/Runtime/testcase/tstRTPath.cpp
r33806 r36611 70 70 if (RT_SUCCESS(rc)) 71 71 RTTestIPrintf(RTTESTLVL_INFO, "UserHome={%s}\n", szPath); 72 73 RTTestSub(hTest, "RTPathUserDocuments"); 74 RTTESTI_CHECK_RC(RTPathUserDocuments(szPath, sizeof(szPath)), VINF_SUCCESS); 75 if (RT_SUCCESS(rc)) 76 RTTestIPrintf(RTTESTLVL_INFO, "UserDocuments={%s}\n", szPath); 72 77 73 78 RTTestSub(hTest, "RTPathTemp");
Note:
See TracChangeset
for help on using the changeset viewer.