putenv() doesn´t work under xp why???

hi folks,
i´m working with centura team developer and i have a big problem using _putenv()and I have included the msvcrt.dll so I should be able to use _putenv
but it fails on XP?? Why? getenv is no problem!
I tried to use _wputenv but .... the same
I want to add to PATH a new path and I have a String
I fetch the "oldpath" with getenv('PATH')
and later on I want to set it with _putenv(sPath)
sPath = C:Centura;C:Centuratest;
Is this wrong???
or should I use _putenv like this:
_putenv('PATH' = sPath)
but if i do it like this
an error occurs wrong data type
Thank you for your help

mbd's picture


just an idea ...

couldn't it be due to "security" or "rights" on your machine ?

did you try to do the same, logged as an administrator ?