|
|
Title | Get the path to special folders such as the Favorites, Cookies, and StartUp |
Keywords | special folder, special path, favorites, cookies, startup |
Categories | Files and Directories, Windows, API |
|
|
Use the SHGetSpecialFolderPath API function.
|
|
' Get a special folder's path.
Private Function GetSpecialFolderPath(ByVal folder_number _
As Long) As String
Dim Path As String
Path = Space$(MAX_PATH)
If SHGetSpecialFolderPath(hwnd, Path, _
folder_number, False) _
Then
GetSpecialFolderPath = Left$(Path, InStr(Path, _
Chr$(0)))
Else
GetSpecialFolderPath = "???"
End If
End Function
|
|
|
|
|
|