   SetEnvironmentVariable
  HiOn windows (nt/xp/2k, how to add a directory to PATH env variable ?When i use : char *env = toString("%s:%s", GetEnvironmentStrings("PATH") + "myPath");SetEnvironmentVariable("PATH", env);Before setEnv, i can use system(..) funtion to call "CMD", after setEnv i can not ! Why ? 
  Because you fucked up the path. GetEnvironmentString returns a void pointer to an environment block, not a string. ReadFurthermore, you can''t add two C-style strings together using the + operator. Use sprintf. 