• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ArrayList_Unlock函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ArrayList_Unlock函数的典型用法代码示例。如果您正苦于以下问题:C++ ArrayList_Unlock函数的具体用法?C++ ArrayList_Unlock怎么用?C++ ArrayList_Unlock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ArrayList_Unlock函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: shadow_client_boardcast_msg

int shadow_client_boardcast_msg(rdpShadowServer* server, void* context, UINT32 type, SHADOW_MSG_OUT* msg, void* lParam)
{
	wMessage message = {0};
	rdpShadowClient* client = NULL;
	int count = 0;
	int index = 0;

	message.context = context;
	message.id = type;
	message.wParam = (void *)msg;
	message.lParam = lParam;
	message.Free = shadow_msg_out_release;

	/* First add reference as we reference it in this function.
     * Therefore it would not be free'ed during post. */
	shadow_msg_out_addref(&message);

	ArrayList_Lock(server->clients);
	for (index = 0; index < ArrayList_Count(server->clients); index++)
	{
		client = (rdpShadowClient*)ArrayList_GetItem(server->clients, index);
		if (shadow_client_dispatch_msg(client, &message))
		{
			count++;
		}
	}
	ArrayList_Unlock(server->clients);

    /* Release the reference for this function */
	shadow_msg_out_release(&message);

	return count;
}
开发者ID:Graf3x,项目名称:FreeRDP,代码行数:33,代码来源:shadow_client.c


示例2: freerdp_channels_find_by_instance

static rdpChannels* freerdp_channels_find_by_instance(freerdp* instance)
{
	int index;
	BOOL found = FALSE;
	rdpChannels* channels = NULL;

	ArrayList_Lock(g_ChannelsList);

	index = 0;
	channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, index++);

	while (channels)
	{
		if (channels->instance == instance)
		{
			found = TRUE;
			break;
		}

		channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, index++);
	}

	ArrayList_Unlock(g_ChannelsList);

	return (found) ? channels : NULL;
}
开发者ID:KimDongChun,项目名称:FreeRDP,代码行数:26,代码来源:channels.c


示例3: assert

IWTSVirtualChannel *dvcman_find_channel_by_id(IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId)
{
	int index;
	BOOL found = FALSE;
	DVCMAN_CHANNEL *channel;
	DVCMAN *dvcman = (DVCMAN *) pChannelMgr;
	assert(dvcman);
	ArrayList_Lock(dvcman->channels);
	index = 0;
	channel = (DVCMAN_CHANNEL *) ArrayList_GetItem(dvcman->channels, index++);

	while (channel)
	{
		if (channel->channel_id == ChannelId)
		{
			found = TRUE;
			break;
		}

		channel = (DVCMAN_CHANNEL *) ArrayList_GetItem(dvcman->channels, index++);
	}

	ArrayList_Unlock(dvcman->channels);
	return (found) ? ((IWTSVirtualChannel *) channel) : NULL;
}
开发者ID:Auto-Droid,项目名称:FreeRDP,代码行数:25,代码来源:dvcman.c


示例4: wts_get_dvc_channel_by_id

static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, UINT32 ChannelId)
{
	int index;
	int count;
	BOOL found = FALSE;
	rdpPeerChannel* channel = NULL;

	ArrayList_Lock(vcm->dynamicVirtualChannels);

	count = ArrayList_Count(vcm->dynamicVirtualChannels);

	for (index = 0; index < count; index++)
	{
		channel = (rdpPeerChannel*) ArrayList_GetItem(vcm->dynamicVirtualChannels, index);

		if (channel->channelId == ChannelId)
		{
			found = TRUE;
			break;
		}
	}

	ArrayList_Unlock(vcm->dynamicVirtualChannels);

	return found ? channel : NULL;
}
开发者ID:Auto-Droid,项目名称:FreeRDP,代码行数:26,代码来源:server.c


示例5: freerdp_channels_find_by_open_handle

static rdpChannels* freerdp_channels_find_by_open_handle(int open_handle, int* pindex)
{
	int i, j;
	BOOL found = FALSE;
	rdpChannels* channels = NULL;

	ArrayList_Lock(g_ChannelsList);

	i = j = 0;
	channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, i++);

	while (channels)
	{
		for (j = 0; j < channels->channelDataCount; j++)
		{
			if (channels->channelDataList[j].open_handle == open_handle)
			{
				*pindex = j;
				found = TRUE;
				break;
			}
		}

		if (found)
			break;

		channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, i++);
	}

	ArrayList_Unlock(g_ChannelsList);

	return (found) ? channels : NULL;
}
开发者ID:KimDongChun,项目名称:FreeRDP,代码行数:33,代码来源:channels.c


示例6: _Publish

static void _Publish(rdpShadowMultiClientEvent* event)
{
	wArrayList* subscribers;
	struct rdp_shadow_multiclient_subscriber* subscriber = NULL;
	int i;

	subscribers = event->subscribers;

	assert(event->consuming == 0);

	/* Count subscribing clients */
	ArrayList_Lock(subscribers);
	for (i = 0; i < ArrayList_Count(subscribers); i++)
	{
		subscriber = (struct rdp_shadow_multiclient_subscriber *)ArrayList_GetItem(subscribers, i);
		/* Set flag to subscriber: I acknowledge and please handle */
		subscriber->pleaseHandle = TRUE;
		event->consuming++;
	}
	ArrayList_Unlock(subscribers);

	if (event->consuming > 0)
	{
		event->eventid = (event->eventid & 0xff) + 1;
		WLog_VRB(TAG, "Server published event %d. %d clients.\n", event->eventid, event->consuming);
		ResetEvent(event->doneEvent);
		SetEvent(event->event);
	}

	return;
}
开发者ID:BUGgs,项目名称:FreeRDP,代码行数:31,代码来源:shadow_mcevent.c


示例7: FreeRDP_WTSCloseServer

VOID WINAPI FreeRDP_WTSCloseServer(HANDLE hServer)
{
	int index;
	int count;
	rdpPeerChannel* channel;
	WTSVirtualChannelManager* vcm;
	vcm = (WTSVirtualChannelManager*) hServer;

	if (vcm)
	{
		HashTable_Remove(g_ServerHandles, (void*)(UINT_PTR) vcm->SessionId);
		ArrayList_Lock(vcm->dynamicVirtualChannels);
		count = ArrayList_Count(vcm->dynamicVirtualChannels);

		for (index = 0; index < count; index++)
		{
			channel = (rdpPeerChannel*) ArrayList_GetItem(vcm->dynamicVirtualChannels,
			          index);
			WTSVirtualChannelClose(channel);
		}

		ArrayList_Unlock(vcm->dynamicVirtualChannels);
		ArrayList_Free(vcm->dynamicVirtualChannels);

		if (vcm->drdynvc_channel)
		{
			WTSVirtualChannelClose(vcm->drdynvc_channel);
			vcm->drdynvc_channel = NULL;
		}

		MessageQueue_Free(vcm->queue);
		free(vcm);
	}
}
开发者ID:dcatonR1,项目名称:FreeRDP,代码行数:34,代码来源:server.c


示例8: FindWindowClass

WNDCLASSEXA* FindWindowClass(LPCSTR lpClassName)
{
	int index;
	int count;
	BOOL found = FALSE;
	WNDCLASSEXA* lpwcx = NULL;

	ArrayList_Lock(g_WindowClasses);

	count = ArrayList_Count(g_WindowClasses);

	for (index = 0; index < count; index++)
	{
		lpwcx = (WNDCLASSEXA*) ArrayList_GetItem(g_WindowClasses, index);

		if (strcmp(lpClassName, lpwcx->lpszClassName) == 0)
		{
			found = TRUE;
			break;
		}
	}

	ArrayList_Unlock(g_WindowClasses);

	return (found) ? lpwcx : NULL;
}
开发者ID:99455125,项目名称:FreeRDP,代码行数:26,代码来源:wnd.c


示例9: svc_plugin_find_by_open_handle

static rdpSvcPlugin* svc_plugin_find_by_open_handle(UINT32 open_handle)
{
	int index;
	BOOL found = FALSE;
	rdpSvcPlugin* plugin;

	ArrayList_Lock(g_AddinList);

	index = 0;
	plugin = (rdpSvcPlugin*) ArrayList_GetItem(g_AddinList, index++);

	while (plugin)
	{
		if (plugin->open_handle == open_handle)
		{
			found = TRUE;
			break;
		}

		plugin = (rdpSvcPlugin*) ArrayList_GetItem(g_AddinList, index++);
	}

	ArrayList_Unlock(g_AddinList);

	return (found) ? plugin : NULL;
}
开发者ID:akboom,项目名称:FreeRDP,代码行数:26,代码来源:svc_plugin.c


示例10: tsmf_presentation_find_by_id

TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE *guid)
{
	UINT32 index;
	UINT32 count;
	BOOL found = FALSE;
	char guid_str[GUID_SIZE * 2 + 1];
	TSMF_PRESENTATION* presentation;

	ArrayList_Lock(presentation_list);
	count = ArrayList_Count(presentation_list);

	for (index = 0; index < count; index++)
	{
		presentation = (TSMF_PRESENTATION*) ArrayList_GetItem(presentation_list, index);

		if (memcmp(presentation->presentation_id, guid, GUID_SIZE) == 0)
		{
			found = TRUE;
			break;
		}
	}

	ArrayList_Unlock(presentation_list);

	if (!found)
		WLog_WARN(TAG, "presentation id %s not found", guid_to_string(guid, guid_str, sizeof(guid_str)));

	return (found) ? presentation : NULL;
}
开发者ID:artemh,项目名称:FreeRDP,代码行数:29,代码来源:tsmf_media.c


示例11: tsmf_presentation_set_geometry_info

BOOL tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation,
		UINT32 x, UINT32 y, UINT32 width, UINT32 height, int num_rects, RDP_RECT *rects)
{
	UINT32 index;
	UINT32 count;
	TSMF_STREAM* stream;
	void *tmp_rects = NULL;
	BOOL ret = TRUE;

	/* The server may send messages with invalid width / height.
	 * Ignore those messages. */
	if (!width || !height)
		return TRUE;

	/* Streams can be added/removed from the presentation and the server will resend geometry info when a new stream is 
	 * added to the presentation. Also, num_rects is used to indicate whether or not the window is visible.
	 * So, always process a valid message with unchanged position/size and/or no visibility rects.
	 */

	presentation->x = x;
	presentation->y = y;
	presentation->width = width;
	presentation->height = height;
	
	tmp_rects = realloc(presentation->rects, sizeof(RDP_RECT) * num_rects);


	if(!num_rects)
		presentation->rects=NULL;

	if (!tmp_rects&&num_rects)
		return;

	presentation->nr_rects = num_rects;
	presentation->rects = tmp_rects;

	CopyMemory(presentation->rects, rects, sizeof(RDP_RECT) * num_rects);

	ArrayList_Lock(presentation->stream_list);
	count = ArrayList_Count(presentation->stream_list);

	for (index = 0; index < count; index++)
	{
		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);

		if (!stream->decoder)
			continue;

		if (stream->decoder->UpdateRenderingArea)
		{
			ret = stream->decoder->UpdateRenderingArea(stream->decoder, x, y, width, height, num_rects, rects);
		}
	}

	ArrayList_Unlock(presentation->stream_list);
	return ret;
}
开发者ID:artemh,项目名称:FreeRDP,代码行数:57,代码来源:tsmf_media.c


示例12: tsmf_presentation_set_geometry_info

BOOL tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation,
		UINT32 x, UINT32 y, UINT32 width, UINT32 height, int num_rects, RDP_RECT *rects)
{
	UINT32 index;
	UINT32 count;
	TSMF_STREAM* stream;
	void *tmp_rects;
	BOOL ret = TRUE;

	if (num_rects < 1 || !rects)
		return TRUE;

	/* The server may send messages with invalid width / height.
	 * Ignore those messages. */
	if (!width || !height)
		return TRUE;

	if ((width == presentation->width) && (height == presentation->height) &&
			(x == presentation->x) && (y == presentation->y) &&
			(num_rects == presentation->nr_rects) &&
			(0 == memcmp(rects, presentation->rects, num_rects * sizeof(RDP_RECT))))
	{
		return TRUE;
	}

	presentation->x = x;
	presentation->y = y;
	presentation->width = width;
	presentation->height = height;

	tmp_rects = realloc(presentation->rects, sizeof(RDP_RECT) * num_rects);
	if (!tmp_rects)
		return FALSE;
	presentation->nr_rects = num_rects;
	presentation->rects = tmp_rects;

	CopyMemory(presentation->rects, rects, sizeof(RDP_RECT) * num_rects);

	ArrayList_Lock(presentation->stream_list);
	count = ArrayList_Count(presentation->stream_list);

	for (index = 0; index < count; index++)
	{
		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);

		if (!stream->decoder)
			continue;

		if (stream->decoder->UpdateRenderingArea)
		{
			ret = stream->decoder->UpdateRenderingArea(stream->decoder, x, y, width, height, num_rects, rects);
		}
	}

	ArrayList_Unlock(presentation->stream_list);
	return ret;
}
开发者ID:BUGgs,项目名称:FreeRDP,代码行数:57,代码来源:tsmf_media.c


示例13: freerdp_channels_free

void freerdp_channels_free(rdpChannels* channels)
{
	MessagePipe_Free(channels->MsgPipe);

	ArrayList_Lock(g_ChannelsList);
	ArrayList_Remove(g_ChannelsList, channels);
	ArrayList_Unlock(g_ChannelsList);

	free(channels);
}
开发者ID:jlafontaine-devolutions,项目名称:FreeRDP,代码行数:10,代码来源:channels.c


示例14: CreateFileA

HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
				   DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
	int i;

	if (!lpFileName)
		return INVALID_HANDLE_VALUE;

	if (pthread_once(&_HandleCreatorsInitialized, _HandleCreatorsInit) != 0)
	{
		SetLastError(ERROR_DLL_INIT_FAILED);
		return INVALID_HANDLE_VALUE;
	}

	if (_HandleCreators == NULL)
	{
		SetLastError(ERROR_DLL_INIT_FAILED);
		return INVALID_HANDLE_VALUE;
	}

	ArrayList_Lock(_HandleCreators);

	for (i=0; i <= ArrayList_Count(_HandleCreators); i++)
	{
		HANDLE_CREATOR* creator = ArrayList_GetItem(_HandleCreators, i);

		if (creator && creator->IsHandled(lpFileName))
		{
			HANDLE newHandle = creator->CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes,
													dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
			ArrayList_Unlock(_HandleCreators);
			return newHandle;
		}
	}

	ArrayList_Unlock(_HandleCreators);
	return INVALID_HANDLE_VALUE;
}
开发者ID:bceverly,项目名称:FreeRDP,代码行数:38,代码来源:generic.c


示例15: tsmf_presentation_sync

void tsmf_presentation_sync(TSMF_PRESENTATION* presentation)
{
	UINT32 index;
	UINT32 count;
	ArrayList_Lock(presentation->stream_list);
	count = ArrayList_Count(presentation->stream_list);

	for (index = 0; index < count; index++)
	{
		TSMF_STREAM* stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);
		WaitForSingleObject(stream->ready, 500);
	}

	ArrayList_Unlock(presentation->stream_list);
}
开发者ID:EmiyaShilong,项目名称:FreeRDP,代码行数:15,代码来源:tsmf_media.c


示例16: tsmf_presentation_start

void tsmf_presentation_start(TSMF_PRESENTATION* presentation)
{
	UINT32 index;
	UINT32 count;
	TSMF_STREAM* stream;
	ArrayList_Lock(presentation->stream_list);
	count = ArrayList_Count(presentation->stream_list);

	for (index = 0; index < count; index++)
	{
		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);
		tsmf_stream_start(stream);
	}

	ArrayList_Unlock(presentation->stream_list);
}
开发者ID:EmiyaShilong,项目名称:FreeRDP,代码行数:16,代码来源:tsmf_media.c


示例17: tsmf_presentation_volume_changed

void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, UINT32 newVolume, UINT32 muted)
{
	UINT32 index;
	UINT32 count;
	TSMF_STREAM* stream;
	presentation->volume = newVolume;
	presentation->muted = muted;
	ArrayList_Lock(presentation->stream_list);
	count = ArrayList_Count(presentation->stream_list);

	for (index = 0; index < count; index++)
	{
		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);
		tsmf_stream_change_volume(stream, newVolume, muted);
	}

	ArrayList_Unlock(presentation->stream_list);
}
开发者ID:EmiyaShilong,项目名称:FreeRDP,代码行数:18,代码来源:tsmf_media.c


示例18: tsmf_presentation_restarted

BOOL tsmf_presentation_restarted(TSMF_PRESENTATION* presentation)
{
	UINT32 index;
	UINT32 count;
	TSMF_STREAM* stream;
	BOOL ret = TRUE;
	ArrayList_Lock(presentation->stream_list);
	count = ArrayList_Count(presentation->stream_list);

	for (index = 0; index < count; index++)
	{
		stream = (TSMF_STREAM*) ArrayList_GetItem(presentation->stream_list, index);
		ret &= tsmf_stream_restart(stream);
	}

	ArrayList_Unlock(presentation->stream_list);
	return ret;
}
开发者ID:JunaidLoonat,项目名称:FreeRDP,代码行数:18,代码来源:tsmf_media.c


示例19: shadow_client_boardcast_quit

int shadow_client_boardcast_quit(rdpShadowServer* server, int nExitCode)
{
	wMessageQueue* queue = NULL;
	int count = 0;
	int index = 0;

	ArrayList_Lock(server->clients);
	for (index = 0; index < ArrayList_Count(server->clients); index++)
	{
		queue = ((rdpShadowClient*)ArrayList_GetItem(server->clients, index))->MsgQueue;
		if (MessageQueue_PostQuit(queue, nExitCode))
		{
			count++;
		}
	}
	ArrayList_Unlock(server->clients);

	return count;
}
开发者ID:Graf3x,项目名称:FreeRDP,代码行数:19,代码来源:shadow_client.c


示例20: rpc_client_call_find_by_id

RpcClientCall* rpc_client_call_find_by_id(rdpRpc* rpc, UINT32 CallId)
{
	int index;
	int count;
	RpcClientCall* clientCall;
	ArrayList_Lock(rpc->client->ClientCallList);
	clientCall = NULL;
	count = ArrayList_Count(rpc->client->ClientCallList);

	for (index = 0; index < count; index++)
	{
		clientCall = (RpcClientCall*) ArrayList_GetItem(rpc->client->ClientCallList, index);

		if (clientCall->CallId == CallId)
			break;
	}

	ArrayList_Unlock(rpc->client->ClientCallList);
	return clientCall;
}
开发者ID:a1154043439,项目名称:FreeRDP,代码行数:20,代码来源:rpc_client.c



注:本文中的ArrayList_Unlock函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ArraySize函数代码示例发布时间:2022-05-30
下一篇:
C++ ArrayList_GetItem函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap