37 __crt_unique_heap_ptr<wchar_t>
const heap_cwd(_calloc_crt_t(
wchar_t, cwd_length + 1));
38 if (heap_cwd.get() ==
nullptr)
45 if (heap_cwd_length == 0)
60 if (drive_number < 1 || drive_number > 26)
66#pragma warning(suppress:__WARNING_UNUSED_ASSIGNMENT)
67 wchar_t const drive_letter =
static_cast<wchar_t>(
L'A' +
drive_number - 1);
68 wchar_t const drive_string[] = { drive_letter,
L':',
L'\0' };
void __cdecl __acrt_errno_map_os_error(unsigned long)
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
#define GetCurrentDirectoryW(x, y)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
__forceinline int __CRTDECL __ascii_towupper(int const _C)
int __cdecl _chdrive(int const drive_number)
static int __cdecl get_drive_number_from_path(wchar_t const *const path)
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_DRIVE