2018-08-19 12:13:19 +08:00
|
|
|
#include "extensions.h"
|
|
|
|
|
2018-09-01 16:24:22 +08:00
|
|
|
bool ProcessSentence(std::wstring& sentence, const InfoForExtension* miscInfo)
|
2018-08-19 12:13:19 +08:00
|
|
|
{
|
2018-09-01 16:24:22 +08:00
|
|
|
if (GetProperty("current select", miscInfo) && GetProperty("hook address", miscInfo) != -1)
|
2018-08-19 12:13:19 +08:00
|
|
|
{
|
2018-09-01 16:24:22 +08:00
|
|
|
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, (sentence.size() + 2) * sizeof(wchar_t));
|
|
|
|
memcpy(GlobalLock(hMem), sentence.c_str(), (sentence.size() + 2) * sizeof(wchar_t));
|
|
|
|
GlobalUnlock(hMem);
|
|
|
|
OpenClipboard(0);
|
|
|
|
EmptyClipboard();
|
|
|
|
SetClipboardData(CF_UNICODETEXT, hMem);
|
|
|
|
CloseClipboard();
|
2018-08-19 12:13:19 +08:00
|
|
|
}
|
2018-09-01 16:24:22 +08:00
|
|
|
return false;
|
2018-08-19 12:13:19 +08:00
|
|
|
}
|