The GetSystemDirectory function retrieves the path of the system directory. The system directory contains system such files such as dynamic-link libraries, drivers, and font files.
This function is provided primarily for compatibility. Applications should store code in the Program Files folder and persistent data in the Application Data folder in the user's profile.
If the function succeeds, the return value is the length, in TCHARs, of the string copied to the buffer, not including the terminating null character. If the length is greater than the size of the buffer, the return value is the size of the buffer required to hold the path.
If the function fails, the return value is zero. To get extended error information, call GetLastWin32Error.
Applications should not create files in the system directory. If the user is running a shared version of the operating system, the application does not have write access to the system directory.
Kernel Class | Tao.Platform.Windows Namespace | GetWindowsDirectory