Programming, System Programming, Win32, C.
<Psapi.h> void ExitSys(LPCTSTR lpszMsg, int status); int main(void) { char cwd[1024]; if (GetCurrentDirectory(1024, cwd) == 0) ExitSys("GetCurrentDirectory", EXIT_FAILURE); printf("%s\n", cwd); return 0; } void ExitSys(LPCTSTR lpszMsg, int status) { DWORD dwLastError = GetLastError(); LPTSTR