mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-27 15:54:03 +08:00
Update v8.cpp
This commit is contained in:
parent
f26a9a14ef
commit
9b9b9dae57
@ -20,13 +20,14 @@ namespace{
|
|||||||
GlobalUnlock(hClipboardData);
|
GlobalUnlock(hClipboardData);
|
||||||
};
|
};
|
||||||
hp.hook_after=[](hook_stack*s,void* data, size_t len){
|
hp.hook_after=[](hook_stack*s,void* data, size_t len){
|
||||||
HGLOBAL hClipboardData = GlobalAlloc(GMEM_MOVEABLE, len +2);
|
|
||||||
auto pchData = (wchar_t*)GlobalLock(hClipboardData);
|
|
||||||
std::wstring transwithfont;
|
std::wstring transwithfont;
|
||||||
transwithfont+=L'\x01';
|
transwithfont+=L'\x01';
|
||||||
transwithfont+=embedsharedmem->fontFamily;
|
transwithfont+=embedsharedmem->fontFamily;
|
||||||
transwithfont+=L'\x01';
|
transwithfont+=L'\x01';
|
||||||
transwithfont+=std::wstring((wchar_t*)data,len/2);
|
transwithfont+=std::wstring((wchar_t*)data,len/2);
|
||||||
|
HGLOBAL hClipboardData = GlobalAlloc(GMEM_MOVEABLE, transwithfont.size()*2 +2);
|
||||||
|
auto pchData = (wchar_t*)GlobalLock(hClipboardData);
|
||||||
wcscpy(pchData, (wchar_t*)transwithfont.c_str());
|
wcscpy(pchData, (wchar_t*)transwithfont.c_str());
|
||||||
GlobalUnlock(hClipboardData);
|
GlobalUnlock(hClipboardData);
|
||||||
s->arg2=(uintptr_t)hClipboardData;
|
s->arg2=(uintptr_t)hClipboardData;
|
||||||
|
Loading…
Reference in New Issue
Block a user