Commit e82d2285 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

winspool: Implement XcvDataW.

parent 72b126b2
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright 1999 Klaas van Gend * Copyright 1999 Klaas van Gend
* Copyright 1999, 2000 Huw D M Davies * Copyright 1999, 2000 Huw D M Davies
* Copyright 2001 Marcus Meissner * 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -6540,17 +6540,57 @@ emW_cleanup: ...@@ -6540,17 +6540,57 @@ emW_cleanup:
/****************************************************************************** /******************************************************************************
* XcvDataW (WINSPOOL.@) * XcvDataW (WINSPOOL.@)
* *
* Notes: * Execute commands in the Printmonitor DLL
* There doesn't seem to be an A version... *
* 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, BOOL WINAPI XcvDataW( HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData, DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData,
PDWORD pcbOutputNeeded, PDWORD pdwStatus) 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, pInputData, cbInputData, pOutputData,
cbOutputData, pcbOutputNeeded, pdwStatus); 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;
} }
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment