Q: How to get the system directory?
A:
<br>Code:TCHAR szDirectory[MAX_PATH] = "";
UINT Bytes = ::GetSystemDirectory(szDirectory, sizeof(szDirectory));
if(!Bytes)
// Error -> call '::GetLastError()'
else if(Bytes > sizeof(szDirectory))
// Buffer too small
else
// Success