GetSystemDirectoryA
GetSystemDirectoryA is the ANSI version of the Windows API function GetSystemDirectory. It retrieves the path of the Windows system directory for the currently installed operating system and writes it to a user-provided buffer. The function is part of the Windows API and is exported by kernel32.dll; it is declared in Windows.h for C/C++ programs.
The prototype is: UINT GetSystemDirectoryA(LPSTR lpBuffer, UINT uSize);
Behavior: If the function succeeds, it copies the path to lpBuffer and returns the number of characters
Parameters: lpBuffer points to the buffer that receives the path; uSize specifies the size of the buffer
Notes: The resulting path usually resembles C:\Windows\System32, but the actual value can vary with Windows version
See also: GetSystemDirectoryW, GetWindowsDirectory, GetTempPath.