Commit ab615064 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed return value of CreateNamedPipe (spotted by Mike McCormack).

parent 5ba50508
...@@ -491,7 +491,7 @@ HANDLE WINAPI CreateNamedPipeA( LPCSTR name, DWORD dwOpenMode, ...@@ -491,7 +491,7 @@ HANDLE WINAPI CreateNamedPipeA( LPCSTR name, DWORD dwOpenMode,
if (!MultiByteToWideChar( CP_ACP, 0, name, -1, buffer, MAX_PATH )) if (!MultiByteToWideChar( CP_ACP, 0, name, -1, buffer, MAX_PATH ))
{ {
SetLastError( ERROR_FILENAME_EXCED_RANGE ); SetLastError( ERROR_FILENAME_EXCED_RANGE );
return 0; return INVALID_HANDLE_VALUE;
} }
return CreateNamedPipeW( buffer, dwOpenMode, dwPipeMode, nMaxInstances, return CreateNamedPipeW( buffer, dwOpenMode, dwPipeMode, nMaxInstances,
nOutBufferSize, nInBufferSize, nDefaultTimeOut, attr ); nOutBufferSize, nInBufferSize, nDefaultTimeOut, attr );
...@@ -540,8 +540,8 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode, ...@@ -540,8 +540,8 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
req->timeout = nDefaultTimeOut; req->timeout = nDefaultTimeOut;
wine_server_add_data( req, name, len * sizeof(WCHAR) ); wine_server_add_data( req, name, len * sizeof(WCHAR) );
SetLastError(0); SetLastError(0);
wine_server_call_err( req ); if (!wine_server_call_err( req )) ret = reply->handle;
ret = reply->handle; else ret = INVALID_HANDLE_VALUE;
} }
SERVER_END_REQ; SERVER_END_REQ;
return ret; return ret;
......
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