Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Directory where temp web resources are stored, any API?
Message
From
13/04/2000 11:06:39
 
 
To
13/04/2000 01:34:10
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00358821
Message ID:
00359290
Views:
12
>>>Hi all,
>>>
>>>I am looking for the way to get the location where temporary internet resources are stored.
>>>
>>
>>Since different browsers might use different locations, and these folders are not System Folders, I don't believe you'll find a way to query the OS for this.
>
>Yes you can and i definitely need it for our html prototyping software (it creates lots of temp resources):)
>
>WINSHELLAPI HRESULT WINAPI SHGetSpeciailFolderLocation ....
>where a param is CSIDL_INTERNET_CACHE
>
>API and C (if any) gurus welcome at this point

I still think that the path returned by one of the Shell functions will be tied to IE's internet cache folder. Regardless, I put together some code that uses a cousin of the function you referenced to return the path of a special folder. Like Ed said, I recommend instead creating your own working folder. This function is a little more likely to be installed on a target machine than the WSH, but is still tied to v 4.71 or later of Shell32.dll.
#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        
#define CSIDL_COMMON_ALTSTARTUP         0x001e
#define CSIDL_COMMON_FAVORITES          0x001f
#define CSIDL_INTERNET_CACHE            0x0020
#define CSIDL_COOKIES                   0x0021
#define CSIDL_HISTORY                   0x0022


DECLARE INTEGER SHGetSpecialFolderPath IN "Shell32.dll" ;
	INTEGER hWnd, ;
	STRING @lcPath, ;
	INTEGER nFolder, ;
	INTEGER nCreate

lcPath = SPACE(1024)

llSuccess = SHGetSpecialFolderPath(0,@lcPath,CSIDL_INTERNET_CACHE,0)=1

?lcPath
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform