From: Mario Schulz on
Hi Alessandro,

thanks for the hint. but i tried out some days ago... ( i was wondering
that my 2.6 app completley without an error recompile in 2.7b :)) ) ..

but is is the same...some minutes i can work and than wuumsss...

seemed so as the other guys said, that i could not get work on C:\ or
c:\ww_win\ or something like else...

so i will move back to XP...

bye,
Mario



From: Karl Faller on
Mario
> C:\ or
>c:\ww_win\ or something like else...
>so i will move back to XP...

Why? Move your app and give it a try...

Karl
From: Mario Schulz on
Hi,

thanks a lot at all for your answers...

one question left .. in our app we put some temp-files in a folder get
by _cPath := GetEnv("TEMP") ... this folder also seemed to be located at
"C:\xxxx" ... how we can sure that this folder does not have the same
problems with win7 for storing files like "C:\ww_win"...

or is that another variable form windows that we must use ?

bye,
Mario




From: dlzc on
Dear Mario Schulz:

On Jul 29, 3:28 am, Mario Schulz <i...(a)removethiswegenspamconcept-
dv.de> wrote:
> thanks a lot at all for your answers...
>
> one question left .. in our app we put some
> temp-files in a folder get by _cPath :=
> GetEnv("TEMP") ... this folder also seemed
> to be located at "C:\xxxx" ... how we can
> sure that this folder does not have the same
> problems with win7 for storing files like
> "C:\ww_win"...
>
> or is that another variable form windows that
> we must use ?

Theoretically, you should have read / write permissions to the
directory pointed to by TEMP and TMP. But whether that is by calls to
the various temporary file operations in the Win API, or regular
calls, I don't know.

Micro$haft puts their temporary or scratch copies of excel
spreadsheets and word documents in the same directory as the document,
just with a special prefix. Presumably this is so that co-operative
(network) users that might be accessing the same document, knows what
is locked and by whom... where they may not be able to see the TEMP or
TMP folder.

Try it and see if you get the 5333. Just make a test app that opens
or creates a few dozen files there, and marches around in there for a
few thousand record moves.

David A. Smith
From: Geoff Schaller on
Mario.

You should not use GetEnv() anything unless you set it, know it exists
and have arranged rights to the folder. Despite Dave Smith's unnecessary
cynicism here, Microsoft made many security enhancements with Vista,
carried on to W7 and you and everyone else would be better served
obeying them. Here is a better way to get the "correct" temp file that
is safe and basically guaranteed to exist:

FUNCTION GetTempFilePath() AS STRING PASCAL

LOCAL ptrName AS PTR
LOCAL cResult AS STRING

// Provides a trailing slash - GCS 02/04/2006
ptrName := MemAlloc(250)
GetTempPath(250,ptrName)
cResult := Psz2String(ptrName)
MemFree(ptrName)

RETURN cResult

Here is how you get all the 'special' locations (but look up the API on
google to get the full list of defines)

FUNCTION SysInfo_GetFolderLocation(iFolder AS INT) AS STRING PASCAL
LOCAL DIM abFolder[256] AS BYTE
LOCAL iItems IS PTR

SHGetSpecialFolderLocation(GetDesktopWindow(), iFolder, @iItems)
SHGetPathFromIDList(iItems, @abFolder[1])

RETURN LTrim(RTrim(Psz2String(@abFolder)))

....and here is an example using this:

FUNCTION GetMyDocumentsFolder() AS STRING PASCAL

LOCAL cPath AS STRING

cPath := SysInfo_GetFolderLocation(CSIDL_PERSONAL)

RETURN cPath

You can get all the safe, user specific and public (common area)
locations where you should put data and log files for your applications,
whether they be only for the logged on user or all users of the PC.

Geoff





"Mario Schulz" <info(a)removethiswegenspamconcept-dv.de> wrote in message
news:i2rl45$cek$1(a)online.de:

> Hi,
>
> thanks a lot at all for your answers...
>
> one question left .. in our app we put some temp-files in a folder get
> by _cPath := GetEnv("TEMP") ... this folder also seemed to be located at
> "C:\xxxx" ... how we can sure that this folder does not have the same
> problems with win7 for storing files like "C:\ww_win"...
>
> or is that another variable form windows that we must use ?
>
> bye,
> Mario