Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleGet the path to special folders such as the Favorites, Cookies, and StartUp
Keywordsspecial folder, special path, favorites, cookies, startup
CategoriesFiles 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
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated