Group: System Information - Library: kernel32
The GetWindowsDirectory function retrieves the path of the Windows directory. The Windows directory contains such files as applications, initialization files, and help files.
Obtaining the System and Windows folder names
Reading data from INI files
UINT GetWindowsDirectory(
LPTSTR lpBuffer, // buffer for Windows directory
UINT uSize // size of directory buffer
);
DECLARE INTEGER GetWindowsDirectory IN kernel32;
STRING @ lpBuffer,;
INTEGER nSize
lpBuffer [out] Pointer to the buffer to receive the null-terminated string containing the path
uSize [in] Specifies the maximum size of the buffer
If the function succeeds, the return value specifies the number of characters written to the buffer, not including the terminating null character
Alternatives to calling this API function:
? GETENV("windir")
? GETENV("SystemRoot")
See also: GetSystemDirectory, SHGetFolderPath.