[PATCH v2] kernel32: Implement FindNLSStringEx. Tests included.

Huw Davies huw at codeweavers.com
Mon Mar 12 04:38:50 CDT 2018


On Mon, Mar 12, 2018 at 09:25:25AM +0000, Huw Davies wrote:
> On Thu, Mar 08, 2018 at 02:35:59PM -0500, Sergio Gómez Del Real wrote:
> > +    if (flags & FIND_FROMSTART)
> > +    {
> > +        int j;
> > +        for (j = 0; j < src_size; j++)
> > +        {
> > +            if (CompareStringEx(localename, mask, src + j, value_size, value, value_size, NULL, NULL, 0) == CSTR_EQUAL)
> > +            {
> > +                if (found)
> > +                    *found = value_size;
> > +                return j;
> > +            }
> > +        }
> > +        SetLastError(ERROR_SUCCESS);
> > +        return -1;
> > +    }


And actually, with the correct settings for the start, end and
increment values of the above loop, you could use it to handle all
four FIND_ flags, which may end up looking rather cleaner.

Huw.



More information about the wine-devel mailing list