I use this function and do'nt receive the same result.
Under win2000 it return the temp directory of the user c:\documents and setting .....
Under Win XP it return c:\windows\temp
How to return the temp directory of the user with WinXp .
Under win2000 it return the temp directory of the user c:\documents and setting .....
Under Win XP it return c:\windows\temp
How to return the temp directory of the user with WinXp .
It depends on local settings. In my XP I get c:\documents and setting ... It is the default setting.
EMG
With Fivewin and clipper , it return c:\windows\temp
With xharbour and fivewin, it return c:\documents and setting ....
Strong ! 16 and 32 bit !!
Ops, I was not aware to be in the Fivewin for Clipper forum. Yes, I tried with FWH. With Clipper I get c:\windows\temp.
EMG
Or you can use the following API call to get the windows temp folder
function get_temp()
local tbuffer:=space(256)
gettemppath(256,@tbuffer)
tbuffer := LEFT(tbuffer,AT(CHR(0),tbuffer)-1)
return(tbuffer)
DLL32 Function GetTempPath( bufferlen as LONG, tbuffer AS LPSTR) AS LONG ;
PASCAL FROM "GetTempPathA" LIB "kernel32.dll"
I have the same result with the api,
it return windows\temp and not the user tem path .
??
#include "FiveWin.ch"
function Main()
local cValue := Space( 256 )
MsgInfo( GetEnv( "TEMP" ) )
GetEnvironmentVariable( "TEMP", cValue, Len( cValue ) )
MsgInfo( cValue )
return nil
DLL32 FUNCTION GetEnvironmentVariable( cName AS LPSTR, cValue AS LPSTR, nLen AS LONG ) ;
AS LONG PASCAL FROM "GetEnvironmentVariableA" LIB "kernel32.dll"jacquet philippe wrote:I have the same result with the api,
it return windows\temp and not the user tem path .
??