mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-26 23:34:01 +08:00
api
This commit is contained in:
parent
d35fb7a601
commit
b395097057
@ -150,14 +150,14 @@ C_LUNA_API void Luna_useembed(ThreadParam tp, bool use)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
C_LUNA_API void Luna_embedcallback(DWORD pid, LPCWSTR text, LPCWSTR trans)
|
C_LUNA_API void Luna_embedcallback(ThreadParam tp, LPCWSTR text, LPCWSTR trans)
|
||||||
{
|
{
|
||||||
auto sm = Host::GetCommonSharedMem(pid);
|
auto sm = Host::GetCommonSharedMem(tp.processId);
|
||||||
if (!sm)
|
if (!sm)
|
||||||
return;
|
return;
|
||||||
wcsncpy(sm->text, trans, ARRAYSIZE(sm->text));
|
wcsncpy(sm->text, trans, ARRAYSIZE(sm->text));
|
||||||
char eventname[1000];
|
char eventname[1000];
|
||||||
sprintf(eventname, LUNA_EMBED_notify_event, pid, simplehash::djb2_n2((const unsigned char *)(text), wcslen(text) * 2));
|
sprintf(eventname, LUNA_EMBED_notify_event, tp.processId, simplehash::djb2_n2((const unsigned char *)(text), wcslen(text) * 2));
|
||||||
win_event event1(eventname);
|
win_event event1(eventname);
|
||||||
event1.signal(true);
|
event1.signal(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user