Page 5 of 5

Re: Get Special folders

Posted: Sun Mar 28, 2004 7:29 pm
by NoahPhense
high key wrote:I didn't find a code for special folders in André's CodeArchive, so I converted the example from the API-Guide:

Code: Select all

Declare.s GetSpecialfolder(CSIDL)


#CSIDL_DESKTOP = 0
#CSIDL_PROGRAMS = 2
#CSIDL_CONTROLS = 3
#CSIDL_PRINTERS = 4
#CSIDL_PERSONAL = 5
#CSIDL_FAVORITES = 6
#CSIDL_STARTUP = 7
#CSIDL_RECENT = 8
#CSIDL_SENDTO = 9
#CSIDL_BITBUCKET = $A
#CSIDL_STARTMENU = $B
#CSIDL_DESKTOPDIRECTORY = $10
#CSIDL_DRIVES = $11
#CSIDL_NETWORK = $12
#CSIDL_NETHOOD = $13
#CSIDL_FONTS = $14
#CSIDL_TEMPLATES = $15




Structure shItemID
    cb.l
    abID.b 
EndStructure

Structure ItemIDlist
    mkid.shItemID
EndStructure


a$= "Start menu folder: " + GetSpecialfolder(#CSIDL_STARTMENU)
b$= "Favorites folder: " + GetSpecialfolder(#CSIDL_FAVORITES)
c$= "Programs folder: " + GetSpecialfolder(#CSIDL_PROGRAMS)
d$= "Desktop folder: " + GetSpecialfolder(#CSIDL_DESKTOP)
e$= "Startup folder: " + GetSpecialfolder(#CSIDL_STARTUP)

   
MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr$(13)+e$,0)



Procedure.s GetSpecialfolder(CSIDL)
   
    r = SHGetSpecialFolderLocation_(0, CSIDL, @IDL.ITEMIDLIST)
    If r = #NOERROR
        Path$ = Space(512)
        r = SHGetPathFromIDList_(IDL\mkid\cb, Path$)
        folder$ = Trim(Path$)        
       Else
        folder$="" 
    EndIf
    
    ProcedureReturn folder$
    
EndProcedure
Sweet!

- np

Posted: Wed Jun 16, 2004 12:59 pm
by blueznl
hey andre, the format of the english page of the archiv is sometimes a bit irregular (indents)

by the way, x_lib is NOT a winsock lib, it's just a collection of procedures

Posted: Sun Jun 20, 2004 3:56 pm
by Andre
blueznl wrote:hey andre, the format of the english page of the archiv is sometimes a bit irregular (indents)

by the way, x_lib is NOT a winsock lib, it's just a collection of procedures
I can't see any false indents, especially there are no differences between german/english/french sites.

About x_lib I will notice it :wink:

Posted: Sun Jul 18, 2004 8:27 pm
by Psychophanta
Hi Andre, please update some of the elastic collision code (at Graphics-Sprites-Collision section in purearea.net) with whatever you prefer codes inside my final updated codes: http://perso.wanadoo.es/akloiv/ElasticCollision.zip

Thanks a lot :wink:

..

Posted: Wed Jul 28, 2004 7:02 pm
by NoahPhense
VIRTUALYS wrote:thanks for all, Andre.

Great Work!.... :wink:


VIRTUALYS for U 8)
http://www.virtuafx.com
You still alive? You created an awesome progressbarEx.. then poof!

- np