KERNEL32: implement SetFilePointerEx

Dmitry Timoshkov dmitry at baikal.ru
Mon Jun 7 06:20:30 CDT 2004


"Mike McCormack" <mike at codeweavers.com> wrote:

>  /***********************************************************************
> + *           SetFilePointerEx   (KERNEL32.@)
> + */
> +BOOL WINAPI SetFilePointerEx( HANDLE hFile, LARGE_INTEGER distance,
> +                               LARGE_INTEGER *newpos, DWORD method )
> +{
> +    static const int whence[3] = { SEEK_SET, SEEK_CUR, SEEK_END };
> +    BOOL ret = FALSE;
> +    NTSTATUS status;
> +    int fd;
> +
> +    TRACE("handle %p offset %lld newpos %p origin %ld\n",
> +          hFile, distance.QuadPart, newpos, method );

%lld is not portable, Alexandre added wine_dbgstr_longlong() for
that purpose.

MSDN states that newpos parameter is allowed to be NULL, in that case
a new file pointer is not returned.

To avoid code duplication SetFilePointer should become just a wrapper
for SetFilePointerEx.

-- 
Dmitry.




More information about the wine-devel mailing list