Esempio n. 1
0
DWORD freerdp_get_event_handles(rdpContext* context, HANDLE* events,
                                DWORD count)
{
	DWORD nCount = 0;
	nCount += transport_get_event_handles(context->rdp->transport, events, count);

	if (nCount == 0)
		return 0;

	if (events && (nCount < count + 2))
	{
		events[nCount++] = freerdp_channels_get_event_handle(context->instance);
		events[nCount++] = getChannelErrorEventHandle(context);
		events[nCount++] = context->abortEvent;
	}
	else
		return 0;

	if (context->settings->AsyncInput)
	{
		if (nCount >= count)
			return 0;

		events[nCount++] = freerdp_get_message_queue_event_handle(
		                       context->instance, FREERDP_INPUT_MESSAGE_QUEUE);
	}

	return nCount;
}
Esempio n. 2
0
DWORD freerdp_get_event_handles(rdpContext* context, HANDLE* events, DWORD count)
{
	DWORD nCount = 0;

	nCount += transport_get_event_handles(context->rdp->transport, events, count);

	if (nCount == 0)
		return 0;

	if (events && (nCount < count + 1))
	{
		events[nCount++] = freerdp_channels_get_event_handle(context->instance);
		events[nCount++] = getChannelErrorEventHandle(context);
	}
	else
		return 0;

	return nCount;
}