From 852f784dd4dd407d1183c01ce43c1a8e07231275 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 26 Oct 2013 19:39:33 +0200 Subject: kernel32: Change return value of stub SetNamedPipeHandleState to TRUE --- dlls/kernel32/sync.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c index 5b7f810..331188f 100644 --- a/dlls/kernel32/sync.c +++ b/dlls/kernel32/sync.c @@ -1730,7 +1730,8 @@ BOOL WINAPI SetNamedPipeHandleState( * runtime, and it slows down InstallShield a fair bit. */ WARN("stub: %p %p/%d %p %p\n", hNamedPipe, lpMode, lpMode ? *lpMode : 0, lpMaxCollectionCount, lpCollectDataTimeout); - return FALSE; + /* some programs expect this to return TRUE, and will abort otherwise */ + return TRUE; } /*********************************************************************** @@ -1793,14 +1794,12 @@ BOOL WINAPI CallNamedPipeW( mode = PIPE_READMODE_MESSAGE; ret = SetNamedPipeHandleState(pipe, &mode, NULL, NULL); - /* Currently SetNamedPipeHandleState() is a stub returning FALSE */ - if (ret) FIXME("Now that SetNamedPipeHandleState() is more than a stub, please update CallNamedPipeW\n"); - /* + /* Currently SetNamedPipeHandleState() is a stub returning TRUE */ if (!ret) { CloseHandle(pipe); return FALSE; - }*/ + } ret = TransactNamedPipe(pipe, lpInput, lpInputSize, lpOutput, lpOutputSize, lpBytesRead, NULL); CloseHandle(pipe); -- 1.7.9.5