Jump to content
SlicK

Extrage textul din clipboard

Recommended Posts

Posted

Acest cod extrage si afiseaza textul din clipboard la apsarea combinatie de taste CTRL+C

PS: in afara unui trojan nu este prea folositor :P


#include <windows.h>
#include <stdio.h>

int main()
{
while(1)
{
Sleep(10);
if(GetAsyncKeyState(VK_CONTROL)<0 && GetAsyncKeyState(67)==-32767) // la apasarea combinatie de taste CTRL+C
{
char *buffer; //pentru stocarea continutului clipboardului
if(OpenClipboard(NULL)) // deschidem clipboardul
{
buffer=(char*)GetClipboardData(CF_TEXT); // extragem textul din clipboard
printf("%sn==============================n",buffer); // afisam textul
}
CloseClipboard(); // inchidem clipboardul
}
}
return 0;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...