Implemented DosFileHandleToWin32Handle, Win32HandleToDosFileHandle and
[wine/multimedia.git] / scheduler / pipe.c
blob3d83e5373da621669cf1e508387d76f275283a06
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.h"
13 /***********************************************************************
14 * CreatePipe (KERNEL32.170)
16 BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
17 LPSECURITY_ATTRIBUTES sa, DWORD size )
19 BOOL ret;
20 SERVER_START_REQ
22 struct create_pipe_request *req = server_alloc_req( sizeof(*req), 0 );
24 req->inherit = (sa && (sa->nLength>=sizeof(*sa)) && sa->bInheritHandle);
25 if ((ret = !server_call( REQ_CREATE_PIPE )))
27 *hReadPipe = req->handle_read;
28 *hWritePipe = req->handle_write;
31 SERVER_END_REQ;
32 return ret;