Changeset 258 for Include/basic/function.sbp
- Timestamp:
- May 21, 2007, 1:03:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/function.sbp
r257 r258 1231 1231 End Function 1232 1232 1233 Namespace ActiveBasic 1234 Namespace Windows 1235 Function GetPathFromIDList(pidl As LPITEMIDLIST) As String 1236 Dim buf[ELM(MAX_PATH)] As TCHAR 1237 If SHGetPathFromIDList(pidl, buf) Then 1238 Return New String(buf) 1239 Else 1240 Return "" 1241 End If 1242 End Function 1243 1244 Function GetFolderPath(hwnd As HWND, folder As Long) As String 1245 Dim pidl As LPITEMIDLIST 1246 Dim hr = SHGetSpecialFolderLocation(hwnd, folder, pidl) 1247 If SUCCEEDED(hr) Then 1248 GetFolderPath = GetPathFromIDList(pidl) 1249 CoTaskMemFree(pidl) 1250 Else 1251 GetFolderPath = "" 1252 End If 1253 End Function 1254 1255 Function GetFolderPath(folder As Long) As String 1256 Return GetFolderPath(0, folder) 1257 End Function 1258 End Namespace 1259 End Namespace 1260 1233 1261 #endif '_INC_FUNCTION
Note:
See TracChangeset
for help on using the changeset viewer.