Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SHGetSpecialFolderPath
Message
From
23/10/2003 06:33:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/10/2003 01:08:57
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00841432
Message ID:
00841467
Views:
21
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>could show me somebody how to declare the following API call in VFP?
>
>BOOL SHGetSpecialFolderPath(
> HWND hwndOwner,
> LPTSTR lpszPath,
> int nFolder,
> BOOL fCreate
>
>it seems to to be located in ShFolder.dll, but I'm not shure on that.
>
>Thank you for your help
>
>Agnes
#define CSIDL_DESKTOP                   0x0000
#define CSIDL_INTERNET                  0x0001
#define CSIDL_PROGRAMS                  0x0002
#define CSIDL_CONTROLS                  0x0003
#define CSIDL_PRINTERS                  0x0004
#define CSIDL_PERSONAL                  0x0005
#define CSIDL_FAVORITES                 0x0006
#define CSIDL_STARTUP                   0x0007
#define CSIDL_RECENT                    0x0008
#define CSIDL_SENDTO                    0x0009
#define CSIDL_BITBUCKET                 0x000a
#define CSIDL_STARTMENU                 0x000b
#define CSIDL_DESKTOPDIRECTORY          0x0010
#define CSIDL_DRIVES                    0x0011
#define CSIDL_NETWORK                   0x0012
#define CSIDL_NETHOOD                   0x0013
#define CSIDL_FONTS                     0x0014
#define CSIDL_TEMPLATES                 0x0015
#define CSIDL_COMMON_STARTMENU          0x0016
#define CSIDL_COMMON_PROGRAMS           0X0017
#define CSIDL_COMMON_STARTUP            0x0018
#define CSIDL_COMMON_DESKTOPDIRECTORY   0x0019
#define CSIDL_APPDATA                   0x001a
#define CSIDL_PRINTHOOD                 0x001b
#define CSIDL_ALTSTARTUP                0x001d         // DBCS
#define CSIDL_COMMON_ALTSTARTUP         0x001e         // DBCS
#define CSIDL_COMMON_FAVORITES          0x001f
#define CSIDL_INTERNET_CACHE            0x0020
#define CSIDL_COOKIES                   0x0021
#define CSIDL_HISTORY                   0x0022


Declare short SHGetSpecialFolderPath in Shell32.dll ;
    integer hwndOwner, string @ lpszPath, ;
    integer nFolder, short fCreate
#Define MAX_PATH 267    
lpszPath = Replicate(Chr(0),MAX_PATH)

if SHGetSpecialFolderPath(0,@lpszPath,CSIDL_PROGRAMS,0) # 0
  ? left(lpszPath,at(chr(0),lpszPath)
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform