[PATCH 2/2] kernel32: Stub FindFirstStreamW/FindNextStreamW
Fabian Maurer
dark.shadow4 at web.de
Sun Mar 31 10:08:54 CDT 2019
On Sonntag, 31. März 2019 08:36:17 CEST Nikolay Sivov wrote:
> On 3/30/19 10:40 PM, Fabian Maurer wrote:
> > +/************************************************************************
> > ** + * FindFirstStreamW (KERNEL32.@)
> > + */
> > +HANDLE WINAPI FindFirstStreamW(LPCWSTR lpFileName, STREAM_INFO_LEVELS
> > infoLevel, + LPVOID lpFindStreamData, DWORD dwFlags)
> > +{
> > + FIXME("(%s, %d, %p, %x): stub!\n", debugstr_w(lpFileName), infoLevel,
> > lpFindStreamData, dwFlags); +
> > + SetLastError(ERROR_HANDLE_EOF);
> > + return INVALID_HANDLE_VALUE;
> > +}
> > +
> > +
> > +/************************************************************************
> > ** + * FindNextStreamW (KERNEL32.@)
> > + */
> > +BOOL WINAPI FindNextStreamW(HANDLE hFindStream, LPVOID lpFindStreamData)
> > +{
> > + FIXME("(%p, %p): stub!\n", hFindStream, lpFindStreamData);
> > +
> > + SetLastError(ERROR_HANDLE_EOF);
> > + return FALSE;
> > +}
>
> Please use better argument and type names.
I just used the official names from the header. Wine's code style is not
consistent on that, what is preferred - windows naming convention or wine
naming convention?
>
> Regarding error code, will it work if you set it to NOT_IMPLEMENTED?
>
> > @@ -488,7 +488,7 @@
> >
> > # @ stub FindFirstFileTransactedW
> > @ stdcall FindFirstFileW(wstr ptr)
> > # @ stub FindFirstStreamTransactedW
> >
> > -# @ stub FindFirstStreamW
> > +@ stub FindFirstStreamW(str long ptr long)
> >
> > @ stdcall FindFirstVolumeA(ptr long)
> > @ stdcall FindFirstVolumeMountPointA(str ptr long)
>
> Why 'stub'? Is it enough to have 'stub' entry for application to work?
> Also first argument type is wrong.
I implemented it with ERROR_HANDLE_EOF because that should be the return value
when the function succeeds, but there is no stream.
Interesting enough, it works when it's a stub only. The function is never
actually called.
So is just a spec-stub preferred, or should I add a method stub setting
NOT_IMPLEMENTED, or my implementation that just assumes there are no streams?
On a side note, why was there a commented out stub?
Regards,
Fabian Maurer
More information about the wine-devel
mailing list