KERNEL32: implement CallNamedPipe

Dmitry Timoshkov dmitry at baikal.ru
Tue Aug 31 08:09:09 CDT 2004


"Mike McCormack" <mike at codeweavers.com> wrote:

> +    r = WaitNamedPipeW( lpNamedPipeName, nTimeout );
> +    if( !r )
> +        return r;

win2k kernel32 does not do WaitNamedPipeW.

> +    handle = CreateFileW( lpNamedPipeName, GENERIC_READ|GENERIC_WRITE,
> +                          0, NULL, OPEN_EXISTING, 0, NULL );
> +    if( !handle )
> +        return FALSE;

CreateFileW returns INVALID_HANDLE_VALUE on failure, not 0.

> +    r = WriteFile( handle, lpOutput, dwOutputSize, &count, NULL );
> +    if( r )
> +        r = ReadFile( handle, lpInput, dwInputSize, lpBytesRead, NULL );

win2k kernel32 calls SetNamedPipeHandleState and TransactNamedPipe (not
implemented in Wine) here.

> +    CloseHandle( handle );
> +
> +    return r;
>  }

-- 
Dmitry.




More information about the wine-devel mailing list