Pass inherit handle flag properly for CreateNamedPipe.

This commit is contained in:
Uwe Bonnes 2004-02-24 01:06:30 +00:00 committed by Alexandre Julliard
parent 0053b8b24b
commit 9ffce00940
5 changed files with 6 additions and 2 deletions

View File

@ -1062,6 +1062,7 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
req->outsize = nOutBufferSize;
req->insize = nInBufferSize;
req->timeout = nDefaultTimeOut;
req->inherit = (attr && (attr->nLength>=sizeof(*attr)) && attr->bInheritHandle);
wine_server_add_data( req, name, len * sizeof(WCHAR) );
SetLastError(0);
if (!wine_server_call_err( req )) ret = reply->handle;

View File

@ -2414,6 +2414,7 @@ struct create_named_pipe_request
unsigned int outsize;
unsigned int insize;
unsigned int timeout;
int inherit;
/* VARARG(name,unicode_str); */
};
struct create_named_pipe_reply
@ -3762,6 +3763,6 @@ union generic_reply
struct set_global_windows_reply set_global_windows_reply;
};
#define SERVER_PROTOCOL_VERSION 131
#define SERVER_PROTOCOL_VERSION 132
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -629,7 +629,7 @@ DECL_HANDLER(create_named_pipe)
{
server->state = ps_idle_server;
reply->handle = alloc_handle( current->process, server,
GENERIC_READ|GENERIC_WRITE, 0 );
GENERIC_READ|GENERIC_WRITE, req->inherit );
server->pipe->instances++;
release_object( server );
}

View File

@ -1705,6 +1705,7 @@ enum message_type
unsigned int outsize;
unsigned int insize;
unsigned int timeout;
int inherit; /* inherit flag */
VARARG(name,unicode_str); /* pipe name */
@REPLY
obj_handle_t handle; /* handle to the pipe */

View File

@ -2005,6 +2005,7 @@ static void dump_create_named_pipe_request( const struct create_named_pipe_reque
fprintf( stderr, " outsize=%08x,", req->outsize );
fprintf( stderr, " insize=%08x,", req->insize );
fprintf( stderr, " timeout=%08x,", req->timeout );
fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}