[channels] use Stream_BufferAs

For WTSVirtualChannelRead and WTSVirtualChannelWrite use Stream_BufferAs
to cast to correct type.
This commit is contained in:
akallabeth
2024-10-01 10:25:30 +02:00
parent 55177e0e46
commit 11b7633dc0
18 changed files with 47 additions and 39 deletions

View File

@@ -315,7 +315,7 @@ static UINT disp_server_handle_messages(DispServerContext* context)
if (cap > UINT32_MAX)
return CHANNEL_RC_NO_BUFFER;
if (WTSVirtualChannelRead(priv->disp_channel, 0, (PCHAR)Stream_Buffer(s), (ULONG)cap,
if (WTSVirtualChannelRead(priv->disp_channel, 0, Stream_BufferAs(s, char), (ULONG)cap,
&BytesReturned) == FALSE)
{
WLog_ERR(TAG, "WTSVirtualChannelRead failed!");
@@ -499,7 +499,7 @@ static UINT disp_server_packet_send(DispServerContext* context, wStream* s)
goto out;
}
if (!WTSVirtualChannelWrite(context->priv->disp_channel, (PCHAR)Stream_Buffer(s), pos,
if (!WTSVirtualChannelWrite(context->priv->disp_channel, Stream_BufferAs(s, char), pos,
&written))
{
WLog_ERR(TAG, "WTSVirtualChannelWrite failed!");