例如,我想检测何时有人从“ Talk I”更改为“ Talk II”。但是它应该在不断开服务器连接的情况下工作,然后加入“ Talk II”!有办法吗?
答案 0 :(得分:0)
每次用户更新语音状态时,客户端都会发出voiceStateUpdate
事件。
要检测用户是否更改了语音通道,您可以执行以下操作:
_RtlInitUnicodeString RtlInitUnicodeString = (_RtlInitUnicodeString)GetProcAddress(GetModuleHandle(L"ntdll.dll"), "RtlInitUnicodeString");
HANDLE hProcess = 0, hThread = 0;
OBJECT_ATTRIBUTES oa = { 0 };
UNICODE_STRING path;
RtlInitUnicodeString(&path,L"\\??\\C:\\2.exe");
InitializeObjectAttributes(&oa, &path, OBJ_CASE_INSENSITIVE, NULL, NULL);
NTSTATUS status = NtCreateProcess(&hProcess, PROCESS_ALL_ACCESS, &oa,
NtCurrentProcess(), TRUE, 0, 0, 0);