Author: cfinck Date: Fri Jul 17 14:34:23 2015 New Revision: 68412
URL: http://svn.reactos.org/svn/reactos?rev=68412&view=rev Log: [WINSPOOL] The pDevModeContainer parameter of _RpcOpenPrinter is not optional, but its contents may be null. You can see this in the IDL file (pDevModeContainer is not marked with the "unique" attribute) or refer to https://msdn.microsoft.com/en-us/library/cc244808.aspx
Modified: branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/printers.c
Modified: branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/printers.c URL: http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/reac... ============================================================================== --- branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/printers.c [iso-8859-1] (original) +++ branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/printers.c [iso-8859-1] Fri Jul 17 14:34:23 2015 @@ -436,8 +436,7 @@ HANDLE hPrinter; PSPOOLER_HANDLE pHandle; PWSTR pDatatype = NULL; - WINSPOOL_DEVMODE_CONTAINER DevModeContainer; - WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer = NULL; + WINSPOOL_DEVMODE_CONTAINER DevModeContainer = { 0 }; ACCESS_MASK AccessRequired = 0;
// Prepare the additional parameters in the format required by _RpcOpenPrinter @@ -446,14 +445,13 @@ pDatatype = pDefault->pDatatype; DevModeContainer.cbBuf = sizeof(DEVMODEW); DevModeContainer.pDevMode = (BYTE*)pDefault->pDevMode; - pDevModeContainer = &DevModeContainer; AccessRequired = pDefault->DesiredAccess; }
// Do the RPC call RpcTryExcept { - dwErrorCode = _RpcOpenPrinter(pPrinterName, &hPrinter, pDatatype, pDevModeContainer, AccessRequired); + dwErrorCode = _RpcOpenPrinter(pPrinterName, &hPrinter, pDatatype, &DevModeContainer, AccessRequired); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) {