CODE:#define CP_UTF8 65001
#define CF_UNICODETEXT 13
#define GMEM_FIXED 0
external(INT, "MultiByteToWideChar", "MultiByteToWideChar", "Kernel32.dll");
external(INT, "OpenClipboard", "OpenClipboard", "User32.dll");
external(INT, "CloseClipboard", "CloseClipboard", "User32.dll");
external(INT, "EmptyClipboard", "EmptyClipboard", "User32.dll");
external(INT, "SetClipboardData", "SetClipboardData", "User32.dll");
external(INT, "GlobalAlloc", "GlobalAlloc", "Kernel32.dll");
external(INT, "GlobalLock", "GlobalLock", "Kernel32.dll");
external(INT, "GlobalUnlock", "GlobalUnlock", "Kernel32.dll");
external(INT, "GlobalFree", "GlobalFree", "Kernel32.dll");
external(INT, "wcscpy_s", "wcscpy_s", "msvcrt.dll");
char pr[100];
char rez[100];
int g=0;
if (fopen ("C:\111.txt", "rb")!=0)
{
g=freadb(#pr[0], 100);
fclose();
}
pr[g] = 0;
int count = MultiByteToWideChar(CP_UTF8, 0, address(#pr[0]), -1, 0, 0);
MultiByteToWideChar(CP_UTF8, 0, address(#pr[0]), -1, address(#rez[0]), count);
if(OpenClipboard(0))
{
EmptyClipboard();
int hMem = GlobalAlloc(GMEM_FIXED, count * 2 + 2);
int Mem = GlobalLock(hMem);
wcscpy_s(Mem, count * 2 + 2, address(#rez[0]));
GlobalUnlock(hMem);
SetClipboardData(CF_UNICODETEXT, hMem);
GlobalFree(hMem);
CloseClipboard();
}