Is there a function in native c++ that do the same as Environment.SetEnvironmentVariable in c# ?
-
-
There must be one because otherwise Environement.SetEnvironmentVariable could not have been implemented

http://msdn.microsoft.com/en-us/library/ms686206.aspx
-
Yes. It's called SetEnvironmentVariable:
http://msdn.microsoft.com/en-us/library/ms686206(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/ms686206(v=vs.85).aspx
Add your 2¢