[PATCH 03/12] msvcp110: Add tr2_sys__Open_dir implementation.(resend)

YongHao Hu christopherwuy at gmail.com
Tue Sep 29 11:03:02 CDT 2015


Hi,

On 15/9/28 下午7:51, Piotr Caban wrote:
> Hi,
>
> On 09/07/15 16:21, YongHao Hu wrote:
>> +/* ?_Open_dir at sys@tr2 at std@@YAPAXAAY0BAE at DPBDAAHAAW4file_type@123@@Z */
>> +/* 
>> ?_Open_dir at sys@tr2 at std@@YAPEAXAEAY0BAE at 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("(%s %s %p %p)\n", debugstr_a(target), debugstr_a(dest), 
>> err_code, type);
>> +    strcpy(temppath, dest);
>> +    strcat(temppath, "\\*.*");
> Is native limiting the path to MAX_PATH characters? What happens if 
> longer path is passed?
>
As far as I know, we can not create a file or directory when their path 
longer than MAX_PATH on Windows, so it is impossible to pass a longer 
valid path to tr2_sys__Open_dir.
If we pass a longer invalid path, I think that it's err_code would be 
ERROR_PATH_NOT_FOUND( GetLastError() )

Thank you very much. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150930/d44f9676/attachment-0001.html>


More information about the wine-devel mailing list