Test for static was reversed.
[wine.git] / scheduler / pipe.c
blob31157c4d33f739406bd124ea324cf19381493a3b
1 /*
2 * Win32 pipes
4 * Copyright 1998 Alexandre Julliard
5 */
7 #include <assert.h>
8 #include "winerror.h"
9 #include "winbase.h"
10 #include "server/request.h"
11 #include "server.h"
14 /***********************************************************************
15 * CreatePipe (KERNEL32.170)
17 BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
18 LPSECURITY_ATTRIBUTES sa, DWORD size )
20 struct create_pipe_request req;
21 struct create_pipe_reply reply;
22 int len;
24 req.inherit = (sa && (sa->nLength>=sizeof(*sa)) && sa->bInheritHandle);
25 CLIENT_SendRequest( REQ_CREATE_PIPE, -1, 1, &req, sizeof(req) );
26 if (CLIENT_WaitReply( &len, NULL, 1, &reply, sizeof(reply) ) != ERROR_SUCCESS)
27 return FALSE;
28 *hReadPipe = reply.handle_read;
29 *hWritePipe = reply.handle_write;
30 return TRUE;