How can I find out the windows directory using c++? I know it's usually C:\WINDOWS\ however what if the root drive is D, or even the path is different (E:\MyWINDOWS?).
I'm just curious if theres a function like GetEnvironmentVariable ( "%WINDOWSDIR", str ) which would put the value into str or whatever.
Thanks,
Matt