Code : Tout sélectionner
; The following table outlines the different DLL versions, and how they were distributed.
;
; Version DLL Distribution Platform
; 4.00 All Microsoft® Windows® 95/Windows NT® 4.0.
; 4.70 All Microsoft® Internet Explorer 3.x.
; 4.71 All Microsoft® Internet Explorer 4.0
; 4.72 All Microsoft® Internet Explorer 4.01 and Windows® 98
; 5.00 Shlwapi.dll Microsoft® Internet Explorer 5
; 5.00 Shell32.dll Microsoft® Windows® 2000.
; 5.80 Comctl32.dll Microsoft® Internet Explorer 5
; 5.81 Comctl32.dll Microsoft® Windows 2000
;- Dossier Application data
; C:\Documents And Settings\username\Application Data.
; Version 4.71
#CSIDL_APPDATA = $1A
;- Dossier Bureau
; C:\Documents and Settings\username\Desktop
#CSIDL_DESKTOPDIRECTORY = $10
#CSIDL_DESKTOP = $0
;- Dossier Favoris
; C:\Documents and Settings\username\Favorites.
#CSIDL_FAVORITES = $6
;- Dossier Historique
; Internet history items.
#CSIDL_HISTORY = $22
;- Dossier Local Application data
; C:\Documents and Settings\username\Local Settings\Application Data.
; Version 5
#CSIDL_LOCAL_APPDATA = $1C
;- Dossier Mes documents
; C:\Documents and Settings\username\My Documents.
#CSIDL_PERSONAL = $5
;- Dossier Programmes (menu demarrer)
; C:\Documents and Settings\username\Start Menu\Programs.
#CSIDL_PROGRAMS = $2
;- Dossier Recent
; C:\Documents and Settings\username\Recent.
#CSIDL_RECENT = $8
;- Dossier Sendto
; C:\Documents and Settings\username\SendTo.
#CSIDL_SENDTO = $9
;- Dossier Menu demarrer
; C:\Documents and Settings\username\Start Menu.
#CSIDL_STARTMENU = $B
;- Dossier Demarrage (menu demarrer\programme)
; C:\Documents and Settings\username\Start Menu\Programs\Startup.
#CSIDL_STARTUP = $7
;- Dossier Windows
; Version 5.0
; C:\WINNT.
#CSIDL_WINDOWS = $24
Procedure.s GetSpecialFolderLocation(lngCSIDL.l)
Protected lngRet.l
Protected strLocation.s
Protected pidl.l
strLocation = Space(260)
lngRet = SHGetSpecialFolderLocation_(0, lngCSIDL, @pidl)
If lngRet = 0
SHGetPathFromIDList_(pidl, @strLocation)
If lngRet = 0
strLocation = RTrim(strLocation)
If Right(strLocation, 1) <> "\"
strLocation = strLocation + "\"
EndIf
ProcedureReturn strLocation
EndIf
CoTaskMemFree_(pidl)
EndIf
EndProcedure
;- Programme principal
For n = 0 To 100
Debug Str(n) + " " + GetSpecialFolderLocation(n)
Next