>> But then you have to take care of deallocating the memory reserved for >> returning the environment string in. > >You could return a pointer into the protected mode copy of the environment. No, because people may want to change the result. Jonas