Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
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-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated