auto copytoclipboard(char* str) -> void
{
if (OpenClipboard(0))
{
EmptyClipboard();
char* clip_data = (char*)(GlobalAlloc(GMEM_FIXED, MAX_PATH));
lstrcpy(clip_data, str);
SetClipboardData(CF_TEXT, (HANDLE)(clip_data));
LCID* lcid = (DWORD*)(GlobalAlloc(GMEM_FIXED, sizeof(DWORD)));
*lcid = MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT);
SetClipboardData(CF_LOCALE, (HANDLE)(lcid));
CloseClipboard();
}
}