Piotr Caban : localspl: Add partial SeekPrinter implementation.
Module: wine Branch: master Commit: 8aaaf417cda7b266b088dc475994d441ccf10a4b URL: https://gitlab.winehq.org/wine/wine/-/commit/8aaaf417cda7b266b088dc475994d44... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Dec 6 11:21:38 2022 +0100 localspl: Add partial SeekPrinter implementation. --- dlls/localspl/provider.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c index f4bc6fb1389..790d9d64c00 100644 --- a/dlls/localspl/provider.c +++ b/dlls/localspl/provider.c @@ -3899,6 +3899,35 @@ static BOOL WINAPI fpClosePrinter(HANDLE hprinter) return TRUE; } +static BOOL WINAPI fpSeekPrinter(HANDLE hprinter, LARGE_INTEGER distance, + LARGE_INTEGER *pos, DWORD method, BOOL bwrite) +{ + job_t *job = (job_t *)hprinter; + + TRACE("(%p %I64d %p %lx %x)\n", hprinter, distance.QuadPart, pos, method, bwrite); + + if (!job) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (job->header.type != HANDLE_JOB) + { + FIXME("handle %x not supported\n", job->header.type); + return FALSE; + } + + if (bwrite) + { + if (pos) + pos->QuadPart = 0; + return TRUE; + } + + return SetFilePointerEx(job->hf, distance, pos, method); +} + static const PRINTPROVIDOR backend = { fpOpenPrinter, fpSetJob, @@ -3971,7 +4000,7 @@ static const PRINTPROVIDOR backend = { NULL, /* fpEnumPrinterKey */ NULL, /* fpDeletePrinterDataEx */ NULL, /* fpDeletePrinterKey */ - NULL, /* fpSeekPrinter */ + fpSeekPrinter, NULL, /* fpDeletePrinterDriverEx */ NULL, /* fpAddPerMachineConnection */ NULL, /* fpDeletePerMachineConnection */
participants (1)
-
Alexandre Julliard