VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Get Shell Folders locations using SHGetSpecialFolderLocation API. Updates include personal folders

Richard Chute (added to Karthikeyan's)  ()   Windows API Call/Explanation   Visual Basic 4.0 (32-bit)   Unknown Difficulty   Sun 28th July 2002   Mon 8th February 2021

Get Shell Folders locations using SHGetSpecialFolderLocation API. Updates include personal folders like Application Data, All Users folders,

API Declarations


' Updates by Richard Chute
' Intended for use in a module

Private Type SHITEMID
SHItem As Long
itemID() As Byte
End Type
Private Type ITEMIDLIST
shellID As SHITEMID
End Type

Const SF_DESKTOP = &H0
Const SF_PROGRAMS = &H2
Const SF_MYDOCS = &H5
Const SF_FAVORITES = &H6 ' 98+
Const SF_STARTUP = &H7
Const SF_RECENT = &H8
Const SF_SENDTO = &H9
Const SF_STARTMENU = &HB
Const SF_MYMUSIC = &HD ' Me+
Const SF_DESKTOP2 = &H10
Const SF_NETHOOD = &H13
Const SF_FONTS = &H14
Const SF_SHELLNEW = &H15
Const SF_STARTUP2 = &H18
Const SF_ALLUSERSDESK = &H19
Const SF_APPDATA = &H1A
Const SF_PRINTHOOD = &H1B
Const SF_APPDATA2 = &H1C
Const SF_TEMPINETFILES = &H20
Const SF_COOKIES = &H21
Const SF_HISTORY = &H22
Const SF_ALLUSERSAPPDATA = &H23
Const SF_WINDOWS = &H24
Const SF_WINSYSTEM = &H25
Const SF_PROGFILES = &H26
Const SF_MYPICS = &H27 ' Me+
Const SF_USERDIR = &H28
Const SF_WINSYSTEM2 = &H29
Const SF_COMMON = &H2B

Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwnd As Long, ByVal folderid As Long, shidl As ITEMIDLIST) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal shidl As Long, ByVal shPath As String) As Long


Rate Get Shell Folders locations using SHGetSpecialFolderLocation API. Updates include personal folders (1(1 Vote))
Get Shell Folders locations using SHGetSpecialFolderLocation API. Updates include personal folders .bas

Get Shell Folders locations using SHGetSpecialFolderLocation API. Updates include personal folders Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters