Just starting out? Need help? Post your questions and find answers here.
Armoured
Enthusiast
Posts: 365 Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:
Post
by Armoured » Sun Oct 30, 2005 3:44 am
Hi
the API function "GetSystemDirectory" use the values stored in the environment variables or not?
Thanks
roachofdeath
User
Posts: 78 Joined: Sun Apr 24, 2005 3:22 am
Post
by roachofdeath » Sun Oct 30, 2005 4:11 am
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
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Sun Oct 30, 2005 4:20 am
You could always change the environment variable and see if the API call
gives the same string?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
netmaestro
PureBasic Bullfrog
Posts: 8451 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Sun Oct 30, 2005 4:23 am
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.
BERESHEIT
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Sun Oct 30, 2005 4:27 am
> It still gave the original value
Did you reboot after changing it? Maybe it needs that? Don't know.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
netmaestro
PureBasic Bullfrog
Posts: 8451 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Sun Oct 30, 2005 4:29 am
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!
BERESHEIT