Carpetas especiales en Windows?

Post Reply
FiveWiDi
Posts: 910
Joined: Mon Oct 10, 2005 2:38 pm

Carpetas especiales en Windows?

Post by FiveWiDi »

Hola a todos,

He conseguido en este foro una función para obtener carpetas especiales de windows como por ejemplo la de Escritorio de un usuario.

En esta función se pueden utilizar las constantes:

#define CSIDL_PROGRAMS 0x0002 // Start Menu\Programs
#define CSIDL_DESKTOPDIRECTORY 0x0010 // <user name>\Desktop

Ahora he encontrado más constantes que puedo usar pero son unos valores que no entiendo, alguien me podría decir que valores serían los válidos en FiveWin?

Aquí lo que he encontrado:

CSIDL_COMMON_DESKTOPDIRECTORY equ 19h ; xp "C:\Documents and Settings\All Users\Desktop"
CSIDL_COMMON_STARTMENU equ 16h ; xp "C:\Documents and Settings\All Users\Start Menu"

Este valor 19h ó 16h como se deberían escribir en notación 0xnnnn?

Gracias.
Un Saludo
Carlos G.

FiveWin 19.06 + Harbour 3.2, BCC 7 Windows 10
pcordonet
Posts: 110
Joined: Sat Jan 30, 2010 8:35 am
Location: Girona

Re: Carpetas especiales en Windows?

Post by pcordonet »

Hola FiWidi,

Aquí tienes mas identificadores.

Code: Select all


#define CSIDL_DESKTOP = &H0 // The Desktop - virtual folder
#define CSIDL_PROGRAMS = 2 // Program Files
#define CSIDL_CONTROLS = 3 // Control Panel - virtual folder
#define CSIDL_PRINTERS = 4 // Printers - virtual folder
#define CSIDL_DOCUMENTS = 5 // My Documents
#define CSIDL_FAVORITES = 6 // Favourites
#define CSIDL_STARTUP = 7 // Startup Folder
#define CSIDL_RECENT = 8 // Recent Documents
#define CSIDL_SENDTO = 9 // Send To Folder
#define CSIDL_BITBUCKET = 10 // Recycle Bin - virtual folder
#define CSIDL_STARTMENU = 11 // Start Menu
#define CSIDL_DESKTOPFOLDER = 16 // Desktop folder
#define CSIDL_DRIVES = 17 // My Computer - virtual folder
#define CSIDL_NETWORK = 18 // Network Neighbourhood - virtual folder
#define CSIDL_NETHOOD = 19 // NetHood Folder
#define CSIDL_FONTS = 20 // Fonts folder
#define CSIDL_SHELLNEW = 21 // ShellNew folder

 
Estaria bien, si que se respondiera en el foro si la ayuda ha sido buena.
Supongo que le ha ido bien.

Pere
FiveWiDi
Posts: 910
Joined: Mon Oct 10, 2005 2:38 pm

Re: Carpetas especiales en Windows?

Post by FiveWiDi »

pcordonet wrote:Hola FiWidi,

Aquí tienes mas identificadores.

Code: Select all


#define CSIDL_DESKTOP = &H0 // The Desktop - virtual folder
#define CSIDL_PROGRAMS = 2 // Program Files
#define CSIDL_CONTROLS = 3 // Control Panel - virtual folder
#define CSIDL_PRINTERS = 4 // Printers - virtual folder
#define CSIDL_DOCUMENTS = 5 // My Documents
#define CSIDL_FAVORITES = 6 // Favourites
#define CSIDL_STARTUP = 7 // Startup Folder
#define CSIDL_RECENT = 8 // Recent Documents
#define CSIDL_SENDTO = 9 // Send To Folder
#define CSIDL_BITBUCKET = 10 // Recycle Bin - virtual folder
#define CSIDL_STARTMENU = 11 // Start Menu
#define CSIDL_DESKTOPFOLDER = 16 // Desktop folder
#define CSIDL_DRIVES = 17 // My Computer - virtual folder
#define CSIDL_NETWORK = 18 // Network Neighbourhood - virtual folder
#define CSIDL_NETHOOD = 19 // NetHood Folder
#define CSIDL_FONTS = 20 // Fonts folder
#define CSIDL_SHELLNEW = 21 // ShellNew folder

 
Estaria bien, si que se respondiera en el foro si la ayuda ha sido buena.
Supongo que le ha ido bien.

Pere
Gràcies Pere.

Sólo pedía los que me interesaba, por cierto ya está solucionado, las equivalencias que quería son:

CSIDL_COMMON_DESKTOPDIRECTORY equ 19h ; xp "C:\Documents and Settings\All Users\Desktop"
CSIDL_COMMON_STARTMENU equ 16h ; xp "C:\Documents and Settings\All Users\Start Menu"

deben ser:

#define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 ; xp "C:\Documents and Settings\All Users\Desktop"
#define CSIDL_COMMON_STARTMENU 0x0016 ; xp "C:\Documents and Settings\All Users\Start Menu"

Además en la misma lista donde conseguí estos valores, estaban estos otros:

;;those marked with * are valid, but have no filesystem folder

CSIDL_DESKTOP equ 00h ; 98 xp "C:\Documents and Settings\user\Desktop"
CSIDL_INTERNET equ 01h ;*98 xp
CSIDL_PROGRAMS equ 02h ; 98 xp "C:\Documents and Settings\user\Start Menu\Programs"
CSIDL_CONTROLS equ 03h ;*98 xp
CSIDL_PRINTERS equ 04h ;*98 xp
CSIDL_PERSONAL equ 05h ; 98 xp "C:\Documents and Settings\user\My Documents"
CSIDL_FAVORITES equ 06h ; 98 xp "C:\Documents and Settings\user\Favorites"
CSIDL_STARTUP equ 07h ; 98 xp "C:\Documents and Settings\user\Start Menu\Programs\Startup"
CSIDL_RECENT equ 08h ; 98 xp "C:\Documents and Settings\user\Recent"
CSIDL_SENDTO equ 09h ; 98 xp "C:\Documents and Settings\user\SendTo"
CSIDL_BITBUCKET equ 0Ah ;*98 xp
CSIDL_STARTMENU equ 0Bh ; 98 xp "C:\Documents and Settings\user\Start Menu"
CSIDL_MYDOCUMENTS equ 0Ch
CSIDL_MYMUSIC equ 0Dh ; xp "C:\Documents and Settings\user\My Documents\My Music"
CSIDL_MYVIDEO equ 0Eh

CSIDL_DESKTOPDIRECTORY equ 10h ; 98 xp "C:\Documents and Settings\user\Desktop"
CSIDL_DRIVES equ 11h ;*98 xp
CSIDL_NETWORK equ 12h ;*98 xp
CSIDL_NETHOOD equ 13h ; 98 xp "C:\Documents and Settings\user\NetHood"
CSIDL_FONTS equ 14h ; 98 xp "C:\WINDOWS\Fonts"
CSIDL_TEMPLATES equ 15h ; 98 xp "C:\Documents and Settings\user\Templates"
CSIDL_COMMON_STARTMENU equ 16h ; xp "C:\Documents and Settings\All Users\Start Menu"
CSIDL_COMMON_PROGRAMS equ 17h ; xp "C:\Documents and Settings\All Users\Start Menu\Programs"
CSIDL_COMMON_STARTUP equ 18h ; xp "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
CSIDL_COMMON_DESKTOPDIRECTORY equ 19h ; xp "C:\Documents and Settings\All Users\Desktop"
CSIDL_APPDATA equ 1Ah ; 98 xp "C:\Documents and Settings\user\Application Data"
CSIDL_PRINTHOOD equ 1Bh ; 98 xp "C:\Documents and Settings\user\PrintHood"
CSIDL_LOCAL_APPDATA equ 1Ch ; xp "C:\Documents and Settings\user\Local Settings\Application Data"
CSIDL_ALTSTARTUP equ 1Dh
CSIDL_COMMON_ALTSTARTUP equ 1Eh
CSIDL_COMMON_FAVORITES equ 1Fh ; xp "C:\Documents and Settings\All Users\Favorites"

CSIDL_INTERNET_CACHE equ 20h ; 98 xp "C:\Documents and Settings\user\Local Settings\Temporary Internet Files"
CSIDL_COOKIES equ 21h ; 98 xp "C:\Documents and Settings\user\Cookies"
CSIDL_HISTORY equ 22h ; 98 xp "C:\Documents and Settings\user\Local Settings\History"
CSIDL_COMMON_APPDATA equ 23h ; xp "C:\Documents and Settings\All Users\Application Data"
CSIDL_WINDOWS equ 24h ; xp "C:\WINDOWS"
CSIDL_SYSTEM equ 25h ; xp "C:\WINDOWS\system32"
CSIDL_PROGRAM_FILES equ 26h ; xp "C:\Program Files"
CSIDL_MYPICTURES equ 27h
CSIDL_PROFILE equ 28h ; xp "C:\Documents and Settings\user"
CSIDL_SYSTEMX86 equ 29h ; xp "C:\WINDOWS\system32"
CSIDL_PROGRAM_FILES_COMMON equ 2Bh ; xp "C:\Program Files\Common Files"
CSIDL_COMMON_TEMPLATES equ 2Dh ; xp "C:\Documents and Settings\All Users\Templates"
CSIDL_COMMON_DOCUMENTS equ 2Eh
CSIDL_COMMON_ADMINTOOLS equ 2Fh ; xp "C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools"

CSIDL_ADMINTOOLS equ 30h
CSIDL_CONNECTIONS equ 31h ;* xp
CSIDL_COMMON_MUSIC equ 35h
CSIDL_COMMON_PICTURES equ 36h
CSIDL_COMMON_VIDEO equ 37h
CSIDL_RESOURCES equ 38h ; xp "C:\WINDOWS\Resources"
CSIDL_RESOURCES_LOCALIZED equ 39h
CSIDL_COMMON_OEM_LINKS equ 3Ah
CSIDL_CDBURN_AREA equ 3Bh ; xp "C:\Documents and Settings\user\Local Settings\Application Data\Microsoft\CD Burning"
CSIDL_COMPUTERSNEARME equ 3Dh
CSIDL_PROFILES equ 3Eh

CSIDL_FLAG_PER_USER_INIT equ 0800h
CSIDL_FLAG_NO_ALIAS equ 1000h
CSIDL_FLAG_DONT_VERIFY equ 4000h
CSIDL_FLAG_CREATE equ 8000h
;CSIDL_FLAG_MASK equ 0FF00h
Un Saludo
Carlos G.

FiveWin 19.06 + Harbour 3.2, BCC 7 Windows 10
pcordonet
Posts: 110
Joined: Sat Jan 30, 2010 8:35 am
Location: Girona

Re: Carpetas especiales en Windows?

Post by pcordonet »

Gracias me los guardo.

Pere
antolin
Posts: 475
Joined: Thu May 10, 2007 8:30 pm
Location: Sevilla

Re: Carpetas especiales en Windows?

Post by antolin »

Saludos.

Eso está muy bien, pero, y perdonen mi ignorancia, ¿con qué funcón se utilizan esas constantes?

Gracias
Peaaaaaso de foro...
FiveWiDi
Posts: 910
Joined: Mon Oct 10, 2005 2:38 pm

Re: Carpetas especiales en Windows?

Post by FiveWiDi »

antolin wrote:Saludos.

Eso está muy bien, pero, y perdonen mi ignorancia, ¿con qué funcón se utilizan esas constantes?

Gracias
Mira aquí:

http://forums.fivetechsupport.com/viewt ... idl#p70553
Un Saludo
Carlos G.

FiveWin 19.06 + Harbour 3.2, BCC 7 Windows 10
antolin
Posts: 475
Joined: Thu May 10, 2007 8:30 pm
Location: Sevilla

Re: Carpetas especiales en Windows?

Post by antolin »

Ok muchas gracias FiveWiDi. Muy interesante.
Peaaaaaso de foro...
Post Reply