Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API to identify the directory for internet temp files?
Message
From
21/12/2005 07:36:29
 
 
To
21/12/2005 07:28:46
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01079110
Message ID:
01079815
Views:
27
>>>Hi all,
>>>
>>>Googling gave no clear answer. Hope the UT will...
>>>
>>>I'm actively looking for a system call to identify the directory used for temporary internet resources.
>>something like this ?
>>
>>
>>	?Temp_internet_files_Folder()
>>	
>>*--------------------------------------------------------------------------
>>function Temp_internet_files_Folder()
>>
>>	return ExpandEnvStrings('%userprofile%\Local Settings\Temporary Internet Files')
>>
>>endfunc
>>*--------------------------------------------------------------------------
>>#define	DWORD		Long
>>#define LPCTSTR		String @
>>	
>>function ExpandEnvStrings(s)
>>	
>>	&& do this only once
>>	declare DWORD ExpandEnvironmentStrings in Kernel32.dll ;
>>		LPCTSTR lpSrc,  LPTSTR lpDst,  DWORD nSize    && maximum characters in expanded string
>>	
>>	&&
>>	local i, s1
>>	s1 = space(1024)
>>	i = ExpandEnvironmentStrings(@m.s, @m.s1, 1024)
>>	
>>	return left(m.s1, m.i-1)
>>endfunc
>>*--------------------------------------------------------------------------
>>
>
>Hi Gregory,
>
>I have been absent for a couple of days... Thanks a lot for your input and support. I copied the code and tried.
>
>It looks like something is missing in the code. I get the VFP message "too many arguments" for the ExpandEnvironmentStrings call.
>
>Is something missing? Or is this only supported in some system configurations?
>
>François
>
>P-S:my configuration is VFP9 + win2K

Yes, I forgot one define
#define LPTSTR	String @
Supported from WIn95 onwards
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform