msvcrt: Implement _wfindfirst64i32.
This commit is contained in:
parent
504e68ac24
commit
7d50809705
|
@ -1341,7 +1341,7 @@
|
||||||
@ stub _wfindfirst32
|
@ stub _wfindfirst32
|
||||||
@ stub _wfindfirst32i64
|
@ stub _wfindfirst32i64
|
||||||
@ stub _wfindfirst64
|
@ stub _wfindfirst64
|
||||||
@ stub _wfindfirst64i32
|
@ cdecl _wfindfirst64i32(wstr ptr) msvcrt._wfindfirst64i32
|
||||||
@ stub _wfindnext32
|
@ stub _wfindnext32
|
||||||
@ stub _wfindnext32i64
|
@ stub _wfindnext32i64
|
||||||
@ stub _wfindnext64
|
@ stub _wfindnext64
|
||||||
|
|
|
@ -1194,7 +1194,7 @@
|
||||||
@ stub _wfindfirst32
|
@ stub _wfindfirst32
|
||||||
@ stub _wfindfirst32i64
|
@ stub _wfindfirst32i64
|
||||||
@ stub _wfindfirst64
|
@ stub _wfindfirst64
|
||||||
@ stub _wfindfirst64i32
|
@ cdecl _wfindfirst64i32(wstr ptr) msvcrt._wfindfirst64i32
|
||||||
@ stub _wfindnext32
|
@ stub _wfindnext32
|
||||||
@ stub _wfindnext32i64
|
@ stub _wfindnext32i64
|
||||||
@ stub _wfindnext64
|
@ stub _wfindnext64
|
||||||
|
|
|
@ -1181,7 +1181,7 @@
|
||||||
@ stub _wfindfirst32
|
@ stub _wfindfirst32
|
||||||
@ stub _wfindfirst32i64
|
@ stub _wfindfirst32i64
|
||||||
@ stub _wfindfirst64
|
@ stub _wfindfirst64
|
||||||
@ stub _wfindfirst64i32
|
@ cdecl _wfindfirst64i32(wstr ptr) msvcrt._wfindfirst64i32
|
||||||
@ stub _wfindnext32
|
@ stub _wfindnext32
|
||||||
@ stub _wfindnext32i64
|
@ stub _wfindnext32i64
|
||||||
@ stub _wfindnext64
|
@ stub _wfindnext64
|
||||||
|
|
|
@ -156,6 +156,26 @@ static void msvcrt_wfttofdi64( const WIN32_FIND_DATAW *fd, struct MSVCRT__wfindd
|
||||||
strcpyW(ft->name, fd->cFileName);
|
strcpyW(ft->name, fd->cFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* INTERNAL: Translate WIN32_FIND_DATAW to wfinddata64i32_t */
|
||||||
|
static void msvcrt_wfttofd64i32( const WIN32_FIND_DATAW *fd, struct MSVCRT__wfinddata64i32_t* ft)
|
||||||
|
{
|
||||||
|
DWORD dw;
|
||||||
|
|
||||||
|
if (fd->dwFileAttributes == FILE_ATTRIBUTE_NORMAL)
|
||||||
|
ft->attrib = 0;
|
||||||
|
else
|
||||||
|
ft->attrib = fd->dwFileAttributes;
|
||||||
|
|
||||||
|
RtlTimeToSecondsSince1970( (const LARGE_INTEGER *)&fd->ftCreationTime, &dw );
|
||||||
|
ft->time_create = dw;
|
||||||
|
RtlTimeToSecondsSince1970( (const LARGE_INTEGER *)&fd->ftLastAccessTime, &dw );
|
||||||
|
ft->time_access = dw;
|
||||||
|
RtlTimeToSecondsSince1970( (const LARGE_INTEGER *)&fd->ftLastWriteTime, &dw );
|
||||||
|
ft->time_write = dw;
|
||||||
|
ft->size = fd->nFileSizeLow;
|
||||||
|
strcpyW(ft->name, fd->cFileName);
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* _chdir (MSVCRT.@)
|
* _chdir (MSVCRT.@)
|
||||||
*
|
*
|
||||||
|
@ -369,6 +389,27 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64i32(const char * fspec, struct MSVCRT__
|
||||||
return (MSVCRT_intptr_t)hfind;
|
return (MSVCRT_intptr_t)hfind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* _wfindfirst64i32 (MSVCRT.@)
|
||||||
|
*
|
||||||
|
* Unicode version of _findfirst64i32.
|
||||||
|
*/
|
||||||
|
MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64i32(const MSVCRT_wchar_t * fspec, struct MSVCRT__wfinddata64i32_t* ft)
|
||||||
|
{
|
||||||
|
WIN32_FIND_DATAW find_data;
|
||||||
|
HANDLE hfind;
|
||||||
|
|
||||||
|
hfind = FindFirstFileW(fspec, &find_data);
|
||||||
|
if (hfind == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
msvcrt_set_errno(GetLastError());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
msvcrt_wfttofd64i32(&find_data,ft);
|
||||||
|
TRACE(":got handle %p\n",hfind);
|
||||||
|
return (MSVCRT_intptr_t)hfind;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* _wfindfirsti64 (MSVCRT.@)
|
* _wfindfirsti64 (MSVCRT.@)
|
||||||
*
|
*
|
||||||
|
|
|
@ -1114,6 +1114,7 @@
|
||||||
@ cdecl _wfindfirst(wstr ptr) MSVCRT__wfindfirst
|
@ cdecl _wfindfirst(wstr ptr) MSVCRT__wfindfirst
|
||||||
# stub _wfindfirst64
|
# stub _wfindfirst64
|
||||||
@ cdecl _wfindfirsti64(wstr ptr) MSVCRT__wfindfirsti64
|
@ cdecl _wfindfirsti64(wstr ptr) MSVCRT__wfindfirsti64
|
||||||
|
@ cdecl _wfindfirst64i32(wstr ptr) MSVCRT__wfindfirst64i32
|
||||||
@ cdecl _wfindnext(long ptr) MSVCRT__wfindnext
|
@ cdecl _wfindnext(long ptr) MSVCRT__wfindnext
|
||||||
# stub _wfindnext64
|
# stub _wfindnext64
|
||||||
@ cdecl _wfindnexti64(long ptr) MSVCRT__wfindnexti64
|
@ cdecl _wfindnexti64(long ptr) MSVCRT__wfindnexti64
|
||||||
|
|
Loading…
Reference in New Issue