Page 1 of 1
Question about GetSystemDirectory
Posted: Sun Oct 30, 2005 3:44 am
by Armoured
Hi

the API function "GetSystemDirectory" use the values stored in the environment variables or not?
Thanks
Posted: Sun Oct 30, 2005 4:11 am
by roachofdeath
Hm, they are the same for me.. maybe not for others though...
Code: Select all
buffer.s = ""
ebuffer.s = ""
GetSystemDirectory_(buffer.s,#MAX_PATH)
GetEnvironmentVariable_("Path",ebuffer.s,#MAX_PATH)
Debug buffer.s
Debug ebuffer.s
Re: Question about GetSystemDirectory
Posted: Sun Oct 30, 2005 4:20 am
by PB
You could always change the environment variable and see if the API call
gives the same string?

Posted: Sun Oct 30, 2005 4:23 am
by netmaestro
I ran this:
Code: Select all
spot = AllocateMemory(100)
GetSystemDirectory_(spot,100)
Debug PeekS(spot)
and it gave the same value as found in the environment variable. Then I changed the environment variable to read "sysstem32" instead of "system32" and ran it again. It still gave the original value. So, no. I would say it comes from something else. Oh, yeah I better change it back now.

Posted: Sun Oct 30, 2005 4:27 am
by PB
> It still gave the original value
Did you reboot after changing it? Maybe it needs that? Don't know.
Posted: Sun Oct 30, 2005 4:29 am
by netmaestro
Did you reboot after changing it? Maybe it needs that? Don't know.
Come on. I'm not going to do
all his work for him!