mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
Create a branch for audio work
svn path=/branches/audio-bringup/; revision=49478
This commit is contained in:
parent
26c20f3857
commit
5eb25b5c24
20759 changed files with 0 additions and 1141005 deletions
27
lib/sdk/crt/direct/chdir.c
Normal file
27
lib/sdk/crt/direct/chdir.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <precomp.h>
|
||||
#include <ctype.h>
|
||||
#include <direct.h>
|
||||
#include <tchar.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int _tchdir(const _TCHAR* _path)
|
||||
{
|
||||
WCHAR newdir[MAX_PATH];
|
||||
|
||||
if (!SetCurrentDirectory(_path))
|
||||
{
|
||||
_dosmaperr(_path ? GetLastError() : 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Update the drive-specific current directory variable */
|
||||
if (GetCurrentDirectoryW(MAX_PATH, newdir) && newdir[1] == L':')
|
||||
{
|
||||
WCHAR envvar[4] = { L'=', towupper(newdir[0]), L':', L'\0' };
|
||||
SetEnvironmentVariableW(envvar, newdir);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue