Author: cfinck
Date: Wed Jun 24 09:51:29 2015
New Revision: 68248
URL:
http://svn.reactos.org/svn/reactos?rev=68248&view=rev
Log:
[SPOOLSV, WINSPOOL]
Local Communication between winspool.drv and spoolsv.exe happens using the ncalrpc
protocol. The ncacn_np endpoint is only available when sharing a printer. It's then
used for receiving a remote call from win32spl.dll.
Reference:
http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_spoolss.html
This fixes e.g. testing a _RpcOpenPrinter call from our winspool.drv to a local printer
under Windows.
Modified:
branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolsv/rpcserver.c
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c
Modified: branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl
URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
==============================================================================
---
branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl [iso-8859-1]
(original)
+++
branches/colins-printing-for-freedom/reactos/include/reactos/idl/winspool.idl [iso-8859-1]
Wed Jun 24 09:51:29 2015
@@ -841,7 +841,7 @@
[
uuid(12345678-1234-ABCD-EF00-0123456789AB),
version(1.0),
- endpoint("ncacn_np:[\\pipe\\spoolss]"),
+ endpoint("ncalrpc:[spoolss]", "ncacn_np:[\\pipe\\spoolss]"),
pointer_default(unique)
]
Modified:
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolsv/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
==============================================================================
---
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolsv/rpcserver.c [iso-8859-1]
(original)
+++
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolsv/rpcserver.c [iso-8859-1]
Wed Jun 24 09:51:29 2015
@@ -8,11 +8,11 @@
#include "precomp.h"
DWORD WINAPI
-RpcThreadProc(LPVOID lpParameter)
+LrpcThreadProc(LPVOID lpParameter)
{
RPC_STATUS Status;
- Status = RpcServerUseProtseqEpW(L"ncacn_np", 20,
L"\\pipe\\spoolss", NULL);
+ Status = RpcServerUseProtseqEpW(L"ncalrpc", 20, L"spoolss",
NULL);
if (Status != RPC_S_OK)
{
ERR("RpcServerUseProtseqEpW failed with status %ld!\n", Status);
Modified:
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c
URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
==============================================================================
---
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c [iso-8859-1]
(original)
+++
branches/colins-printing-for-freedom/reactos/win32ss/printing/base/winspool/main.c [iso-8859-1]
Wed Jun 24 09:51:29 2015
@@ -15,7 +15,7 @@
RPC_STATUS Status;
// Get us a string binding handle from the supplied connection information
- Status = RpcStringBindingComposeW(NULL, L"ncacn_np", wszName,
L"\\pipe\\spoolss", NULL, &wszStringBinding);
+ Status = RpcStringBindingComposeW(NULL, L"ncalrpc", wszName,
L"spoolss", NULL, &wszStringBinding);
if (Status != RPC_S_OK)
{
ERR("RpcStringBindingComposeW failed with status %ld!\n", Status);