Clipboard Data Deliver
简介
流程
代码
监听
HGLOBAL hglb;
LPVOID lptstr;
SYSTEMTIME systemTime;
if (!OpenClipboard(NULL)) { return; };
hglb = GetClipboardData(CF_TEXT);
if (hglb != NULL)
{
lptstr = GlobalLock(hglb);
if (lptstr != NULL)
{
GetLocalTime(&systemTime);
printf("%d.%d.%d %d:%d:%d\n", systemTime.wYear, systemTime.wMonth, systemTime.wDay, systemTime.wHour, systemTime.wMinute, systemTime.wSecond);
printf("%s\n", lptstr);
fflush(stdout);
GlobalUnlock(hglb);
}
}
CloseClipboard();传递
LINKS
最后更新于