示例#1
0
void StreamPool_AddRef(wStreamPool* pool, BYTE* ptr)
{
	wStream* s;

	s = StreamPool_Find(pool, ptr);

	if (s)
		Stream_AddRef(s);
}
示例#2
0
int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, UINT32 length)
{
	DVCMAN_CHANNEL* channel;

	channel = (DVCMAN_CHANNEL*) dvcman_find_channel_by_id(pChannelMgr, ChannelId);

	if (!channel)
	{
		DEBUG_WARN("ChannelId %d not found!", ChannelId);
		return 1;
	}

	if (channel->dvc_data)
		Stream_Release(channel->dvc_data);

	channel->dvc_data = StreamPool_Take(channel->dvcman->pool, length);
	Stream_AddRef(channel->dvc_data);

	return 0;
}