Listing 1 Local definition of SetCurrentDirectoryW()


BOOL WINAPI SetCurrentDirectoryW(LPCWSTR lpPathName)
{
  size_t  len       = lstrlenW(lpPathName);
  char    *pathName = (char*)_alloca(1 + len);

  WideCharToMultiByte(CP_ACP, 0, lpPathName, 1 + len, pathName, 1 + len, NULL, NULL);

  return SetCurrentDirectoryA(pathName);
}