msvcp110: Add tr2_sys__Open_dir implementation.

Signed-off-by: YongHao Hu <christopherwuy@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
YongHao Hu 2015-10-31 17:28:46 +08:00 committed by Alexandre Julliard
parent d8cc1dccba
commit b5c12faa6a
4 changed files with 45 additions and 6 deletions

View File

@ -1641,8 +1641,8 @@
@ cdecl -arch=win64 ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z(ptr) locale__Locimp__New_Locimp
@ cdecl -arch=win32 ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z(long) locale__Locimp__New_Locimp_transparent
@ cdecl -arch=win64 ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z(long) locale__Locimp__New_Locimp_transparent
@ stub -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXPADPBDAAHAAW4file_type@123@@Z
@ stub -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXPEADPEBDAEAHAEAW4file_type@123@@Z
@ cdecl -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXPADPBDAAHAAW4file_type@123@@Z(ptr str long long) tr2_sys__Open_dir
@ cdecl -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z(ptr str long long) tr2_sys__Open_dir
@ stub -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXPA_WPB_WAAHAAW4file_type@123@@Z
@ stub -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXPEA_WPEB_WAEAHAEAW4file_type@123@@Z
@ cdecl -arch=arm ?_Orphan_all@_Container_base0@std@@QAAXXZ(ptr) Container_base0_Orphan_all

View File

@ -1602,8 +1602,8 @@
@ cdecl -arch=win64 ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z(ptr) locale__Locimp__New_Locimp
@ cdecl -arch=win32 ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z(long) locale__Locimp__New_Locimp_transparent
@ cdecl -arch=win64 ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z(long) locale__Locimp__New_Locimp_transparent
@ stub -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z
@ stub -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z
@ cdecl -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z(ptr str long long) tr2_sys__Open_dir
@ cdecl -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z(ptr str long long) tr2_sys__Open_dir
@ stub -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@_WPB_WAAHAAW4file_type@123@@Z
@ stub -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@_WPEB_WAEAHAEAW4file_type@123@@Z
@ cdecl -arch=arm ?_Orphan_all@_Container_base0@std@@QAAXXZ(ptr) Container_base0_Orphan_all

View File

@ -1602,8 +1602,8 @@
@ cdecl -arch=win64 ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z(ptr) msvcp120.?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z
@ cdecl -arch=win32 ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z(long) msvcp120.?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z
@ cdecl -arch=win64 ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z(long) msvcp120.?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z
@ stub -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z
@ stub -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z
@ cdecl -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z(ptr str long long) msvcp120.?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z
@ cdecl -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z(ptr str long long) msvcp120.?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z
@ stub -arch=win32 ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@_WPB_WAAHAAW4file_type@123@@Z
@ stub -arch=win64 ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@_WPEB_WAEAHAEAW4file_type@123@@Z
@ cdecl -arch=arm ?_Orphan_all@_Container_base0@std@@QAAXXZ(ptr) msvcp120.?_Orphan_all@_Container_base0@std@@QAAXXZ

View File

@ -14439,6 +14439,45 @@ void __cdecl tr2_sys__Last_write_time_set(char const* path, __int64 newtime)
CloseHandle(handle);
}
/* ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z */
/* ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z */
void* __cdecl tr2_sys__Open_dir(char* target, char const* dest, int* err_code, enum file_type* type)
{
HANDLE handle;
WIN32_FIND_DATAA data;
char temppath[MAX_PATH];
TRACE("(%p %s %p %p)\n", target, debugstr_a(dest), err_code, type);
if(strlen(dest) > MAX_PATH - 3) {
*err_code = ERROR_BAD_PATHNAME;
return NULL;
}
strcpy(temppath, dest);
strcat(temppath, "\\*");
handle = FindFirstFileA(temppath, &data);
if(handle == INVALID_HANDLE_VALUE) {
*err_code = GetLastError();
return NULL;
}
while(!strcmp(data.cFileName, ".") || !strcmp(data.cFileName, "..")) {
if(!FindNextFileA(handle, &data)) {
*err_code = ERROR_SUCCESS;
*type = status_unknown;
FindClose(handle);
return NULL;
}
}
strcpy(target, data.cFileName);
*err_code = ERROR_SUCCESS;
if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
*type = directory_file;
else
*type = regular_file;
return handle;
}
/* ??0strstream@std@@QAE@PADHH@Z */
/* ??0strstream@std@@QEAA@PEAD_JH@Z */
#if STREAMSIZE_BITS == 64