mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
winspool: Implement XcvDataW.
This commit is contained in:
parent
72b126b220
commit
e82d2285f4
1 changed files with 45 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
|||
* Copyright 1999 Klaas van Gend
|
||||
* Copyright 1999, 2000 Huw D M Davies
|
||||
* Copyright 2001 Marcus Meissner
|
||||
* Copyright 2005, 2006 Detlef Riekenberg
|
||||
* Copyright 2005, 2006, 2007 Detlef Riekenberg
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -6540,17 +6540,57 @@ emW_cleanup:
|
|||
/******************************************************************************
|
||||
* XcvDataW (WINSPOOL.@)
|
||||
*
|
||||
* Notes:
|
||||
* There doesn't seem to be an A version...
|
||||
* Execute commands in the Printmonitor DLL
|
||||
*
|
||||
* PARAMS
|
||||
* hXcv [i] Handle from OpenPrinter (with XcvMonitor or XcvPort)
|
||||
* pszDataName [i] Name of the command to execute
|
||||
* pInputData [i] Buffer for extra Input Data (needed only for some commands)
|
||||
* cbInputData [i] Size in Bytes of Buffer at pInputData
|
||||
* pOutputData [o] Buffer to receive additional Data (needed only for some commands)
|
||||
* cbOutputData [i] Size in Bytes of Buffer at pOutputData
|
||||
* pcbOutputNeeded [o] PTR to receive the minimal Size in Bytes of the Buffer at pOutputData
|
||||
* pdwStatus [o] PTR to receive the win32 error code from the Printmonitor DLL
|
||||
*
|
||||
* RETURNS
|
||||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*
|
||||
* NOTES
|
||||
* Returning "TRUE" does mean, that the Printmonitor DLL was called successful.
|
||||
* The execution of the command can still fail (check pdwStatus for ERROR_SUCCESS).
|
||||
*
|
||||
* Minimal List of commands, that a Printmonitor DLL should support:
|
||||
*
|
||||
*| "MonitorUI" : Return the Name of the Userinterface-DLL as WSTR in pOutputData
|
||||
*| "AddPort" : Add a Port
|
||||
*| "DeletePort": Delete a Port
|
||||
*
|
||||
* Many Printmonitors support additional commands. Examples for localspl.dll:
|
||||
* "GetDefaultCommConfig", "SetDefaultCommConfig",
|
||||
* "GetTransmissionRetryTimeout", "ConfigureLPTPortCommandOK"
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI XcvDataW( HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
|
||||
DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData,
|
||||
PDWORD pcbOutputNeeded, PDWORD pdwStatus)
|
||||
{
|
||||
FIXME("%p %s %p %d %p %d %p %p\n", hXcv, debugstr_w(pszDataName),
|
||||
opened_printer_t *printer;
|
||||
|
||||
TRACE("(%p, %s, %p, %d, %p, %d, %p, %p)\n", hXcv, debugstr_w(pszDataName),
|
||||
pInputData, cbInputData, pOutputData,
|
||||
cbOutputData, pcbOutputNeeded, pdwStatus);
|
||||
return FALSE;
|
||||
|
||||
printer = get_opened_printer(hXcv);
|
||||
if (!printer || (!printer->hXcv)) {
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*pdwStatus = printer->pm->monitor->pfnXcvDataPort(printer->hXcv, pszDataName,
|
||||
pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
Loading…
Reference in a new issue