Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenchdir.c
Go to the documentation of this file.
00001 #include <precomp.h> 00002 #include <tchar.h> 00003 #include <process.h> 00004 00005 /* 00006 * @implemented 00007 */ 00008 int _tchdir(const _TCHAR* _path) 00009 { 00010 WCHAR newdir[MAX_PATH]; 00011 00012 if (!SetCurrentDirectory(_path)) 00013 { 00014 _dosmaperr(_path ? GetLastError() : 0); 00015 return -1; 00016 } 00017 00018 /* Update the drive-specific current directory variable */ 00019 if (GetCurrentDirectoryW(MAX_PATH, newdir) >= 2) 00020 { 00021 if (newdir[1] == L':') 00022 { 00023 WCHAR envvar[4] = { L'=', towupper(newdir[0]), L':', L'\0' }; 00024 SetEnvironmentVariableW(envvar, newdir); 00025 } 00026 } 00027 00028 return 0; 00029 } Generated on Sun May 27 2012 04:36:27 for ReactOS by
1.7.6.1
|