1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

@shfolder questions

Discussion in 'Support' started by Charles G, Oct 12, 2012.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,021
    Likes Received:
    0
    I am curious as to why the index value goes from 0 to 59 but not consecutively?

    Also is there a plugin for those who are using a version of TCMD that doesn't have @shfolder included? I'm stiull using XP with TCMD 8 but will be getitng a Win 7 or 8 box by new years and want to make my code interchangable, hence wanting to use @shfolder.
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,952
    Likes Received:
    30
    Some of the constants defined in SHLOBJ.H are simply not folders, like
    Code:
    #define CSIDL_INTERNET                  0x0001        // Internet Explorer (icon on desktop)
    #define CSIDL_CONTROLS                  0x0003        // My Computer\Control Panel
    #define CSIDL_PRINTERS                  0x0004        // My Computer\Printers
    Others may be reserved for future use.

    I used to have @SHPATH[] in my 4UTILS plugin but removed it when Rex came out with @SHFOLDER (gladly, since its help alone was 2KB). I don't think modern versions of my plugins will work with TCC v8 (could be wrong, Ive lost track). I don't have old ones, but maybe someone listening has an old 4UTILS.
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,021
    Likes Received:
    0
    Where do I get a copy of SHLOBJ.H Vince? And also the latest 4UTILS is

    ftp://lucky.syr.edu/4plugins\4utils.zip ??

    And the values I am interested are: 01, 03, 04, 10, 12, 15, 17, 18, 27, 29, 30, 42, 44, 49, 50, 51, 52, 57, 58
    and any if they go past 59.
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,952
    Likes Received:
    30
    I don't know where to get SHLOBJ.H but I pasted a longer list of constants below. The latest 4UTILS is on lucky.syr.edu but as I said, @SHPATH was removed years ago.
    Code:
    #define CSIDL_DESKTOP                  0x0000        // <desktop>
    #define CSIDL_INTERNET                  0x0001        // Internet Explorer (icon on desktop)
    #define CSIDL_PROGRAMS                  0x0002        // Start Menu\Programs
    #define CSIDL_CONTROLS                  0x0003        // My Computer\Control Panel
    #define CSIDL_PRINTERS                  0x0004        // My Computer\Printers
    #define CSIDL_PERSONAL                  0x0005        // My Documents
    #define CSIDL_FAVORITES                0x0006        // <user name>\Favorites
    #define CSIDL_STARTUP                  0x0007        // Start Menu\Programs\Startup
    #define CSIDL_RECENT                    0x0008        // <user name>\Recent
    #define CSIDL_SENDTO                    0x0009        // <user name>\SendTo
    #define CSIDL_BITBUCKET                0x000a        // <desktop>\Recycle Bin
    #define CSIDL_STARTMENU                0x000b        // <user name>\Start Menu
    #define CSIDL_MYDOCUMENTS              CSIDL_PERSONAL //  Personal was just a silly name for My Documents
    #define CSIDL_MYMUSIC                  0x000d        // "My Music" folder
    #define CSIDL_MYVIDEO                  0x000e        // "My Videos" folder
    #define CSIDL_DESKTOPDIRECTORY          0x0010        // <user name>\Desktop
    #define CSIDL_DRIVES                    0x0011        // My Computer
    #define CSIDL_NETWORK                  0x0012        // Network Neighborhood (My Network Places)
    #define CSIDL_NETHOOD                  0x0013        // <user name>\nethood
    #define CSIDL_FONTS                    0x0014        // windows\fonts
    #define CSIDL_TEMPLATES                0x0015
    #define CSIDL_COMMON_STARTMENU          0x0016        // All Users\Start Menu
    #define CSIDL_COMMON_PROGRAMS          0X0017        // All Users\Start Menu\Programs
    #define CSIDL_COMMON_STARTUP            0x0018        // All Users\Startup
    #define CSIDL_COMMON_DESKTOPDIRECTORY  0x0019        // All Users\Desktop
    #define CSIDL_APPDATA                  0x001a        // <user name>\Application Data
    #define CSIDL_PRINTHOOD                0x001b        // <user name>\PrintHood
     
    #ifndef CSIDL_LOCAL_APPDATA
    #define CSIDL_LOCAL_APPDATA            0x001c        // <user name>\Local Settings\Applicaiton Data (non roaming)
    #endif // CSIDL_LOCAL_APPDATA
     
    #define CSIDL_ALTSTARTUP                0x001d        // non localized startup
    #define CSIDL_COMMON_ALTSTARTUP        0x001e        // non localized common startup
    #define CSIDL_COMMON_FAVORITES          0x001f
     
    #ifndef _SHFOLDER_H_
    #define CSIDL_INTERNET_CACHE            0x0020
    #define CSIDL_COOKIES                  0x0021
    #define CSIDL_HISTORY                  0x0022
    #define CSIDL_COMMON_APPDATA            0x0023        // All Users\Application Data
    #define CSIDL_WINDOWS                  0x0024        // GetWindowsDirectory()
    #define CSIDL_SYSTEM                    0x0025        // GetSystemDirectory()
    #define CSIDL_PROGRAM_FILES            0x0026        // C:\Program Files
    #define CSIDL_MYPICTURES                0x0027        // C:\Program Files\My Pictures
    #endif // _SHFOLDER_H_
     
    #define CSIDL_PROFILE                  0x0028        // USERPROFILE
    #define CSIDL_SYSTEMX86                0x0029        // x86 system directory on RISC
    #define CSIDL_PROGRAM_FILESX86          0x002a        // x86 C:\Program Files on RISC
     
    #ifndef _SHFOLDER_H_
    #define CSIDL_PROGRAM_FILES_COMMON      0x002b        // C:\Program Files\Common
    #endif // _SHFOLDER_H_
     
    #define CSIDL_PROGRAM_FILES_COMMONX86  0x002c        // x86 Program Files\Common on RISC
    #define CSIDL_COMMON_TEMPLATES          0x002d        // All Users\Templates
     
    #ifndef _SHFOLDER_H_
    #define CSIDL_COMMON_DOCUMENTS          0x002e        // All Users\Documents
    #define CSIDL_COMMON_ADMINTOOLS        0x002f        // All Users\Start Menu\Programs\Administrative Tools
    #define CSIDL_ADMINTOOLS                0x0030        // <user name>\Start Menu\Programs\Administrative Tools
    #endif // _SHFOLDER_H_
     
    #define CSIDL_CONNECTIONS              0x0031        // Network and Dial-up Connections
    #define CSIDL_COMMON_MUSIC              0x0035        // All Users\My Music
    #define CSIDL_COMMON_PICTURES          0x0036        // All Users\My Pictures
    #define CSIDL_COMMON_VIDEO              0x0037        // All Users\My Video
    #define CSIDL_RESOURCES                0x0038        // Resource Direcotry
     
    #ifndef _SHFOLDER_H_
    #define CSIDL_RESOURCES_LOCALIZED      0x0039        // Localized Resource Direcotry
    #endif // _SHFOLDER_H_
     
    #define CSIDL_COMMON_OEM_LINKS          0x003a        // Links to All Users OEM specific apps
    #define CSIDL_CDBURN_AREA              0x003b        // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    The documented values are the only ones that will work with @SHFOLDER. The others are for non-folder objects -- why do you want to access them?
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    Well, he did write "curious".

    On a related note, the OP wonders about a plugin to add this functionality to older versions of Take Command. Of course, such a plugin would work just as well in TCC/LE -- restoring a function which you chose to remove from the unpaid product. Rex, what are your feelings about that?
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    Doesn't bother me -- I doubt anyone upgraded from TCC/LE in order to get @shrfolder.

    The big features are TCMD and the batch IDE/debugger. Those are a bit harder for a plugin ...
     
  8. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    And Internet support and UDFs, ditto.
     

Share This Page