20 &
reinterpret_cast<HANDLE&
>(new_osfhandle),
44 ptd.get_doserrno().set(0);
45 _ASSERTE((
"Invalid file descriptor. File possibly closed by a different thread", 0));
54 ptd.get_doserrno().set(0);
58 int return_value = -1;
68 if (return_value == -1)
94 __crt_cached_ptd_host
ptd;
int __cdecl _alloc_osfhnd(void)
int __cdecl __acrt_lowio_set_os_handle(int, intptr_t)
auto __acrt_lowio_lock_fh_and_call(int const fh, Action &&action) -> decltype(action())
void __cdecl __acrt_lowio_unlock_fh(_In_ int _FileHandle)
#define _UCRT_VALIDATE_CLEAR_OSSERR_RETURN(ptd, expr, errorcode, retexpr)
#define _UCRT_CHECK_FH_CLEAR_OSSERR_RETURN(ptd, handle, errorcode, retexpr)
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
#define GetCurrentProcess()
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
static int __cdecl _dup_nolock_internal(int const fh, __crt_cached_ptd_host &ptd)
static int __cdecl duplicate_osfhnd(int const fh, int const new_fh, __crt_cached_ptd_host &ptd)
int __cdecl _dup(int const fh)
static int __cdecl _dup_internal(int const fh, __crt_cached_ptd_host &ptd)
void __cdecl __acrt_errno_map_os_error_ptd(unsigned long const oserrno, __crt_cached_ptd_host &ptd)
_CRTIMP intptr_t __cdecl _get_osfhandle(_In_ int _FileHandle)
DWORD WINAPI GetLastError(void)
#define DUPLICATE_SAME_ACCESS