Set Folder Path API
We can get the path name of a special folder with SHGetFolderPath API.
we can find this function name in shfolder.dll or shell32.dll,but i can't find it's corresponding interface function in shfolder.dll or shell32.dll.
In fact,this function is provided by shell32.dll
for example:
a piece of code:
Public Declare Function SHSetFolderPathW Lib "shell32" Alias "#232" (ByVal csidl As Long, ByVal hToken As Long, ByVal dwFlags As Long, ByVal pszPath As Long) As Long
Public Declare Function SHSetFolderPathA Lib "shell32" Alias "#231" (ByVal csidl As Long, ByVal hToken As Long, ByVal dwFlags As Long, ByVal pszPath As String) As Long
If IsWinNT Then
ReVal = SHSetFolderPathW(lngCSIDL, -1, SHGFP_TYPE_CURRENT, StrPtr(strPath))
Else
ReVal = SHSetFolderPathA(lngCSIDL, ByVal 0&, 0, strPath)
End If
note:
the SHSetFolderPath API work in
| Minimum operating systems is |
Windows 2000 or Windows Millennium Millennium Edition |
Takes the CSIDL of a folder and returns the pathname