20 ptd.get_doserrno().set(0);
21 _ASSERTE((
"Invalid file descriptor. File possibly closed by a different thread",0));
32 &
reinterpret_cast<HANDLE&
>(new_osfhandle),
78 if (source_fh == target_fh)
85 if (source_fh < target_fh)
90 else if (source_fh > target_fh)
119 __crt_cached_ptd_host
ptd;
_Check_return_opt_ int __cdecl _close_nolock_internal(_In_ int _FileHandle, _Inout_ __crt_cached_ptd_host &_Ptd)
int __cdecl __acrt_lowio_set_os_handle(int, intptr_t)
_Check_return_opt_ errno_t __cdecl __acrt_lowio_ensure_fh_exists(_In_ int _FileHandle)
void __cdecl __acrt_lowio_lock_fh(_In_ int _FileHandle)
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)
int __cdecl _dup2(int const source_fh, int const target_fh)
static int __cdecl _dup2_internal(int const source_fh, int const target_fh, __crt_cached_ptd_host &ptd)
static int __cdecl _dup2_nolock_internal(int const source_fh, int const target_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