Written on December 8th, 2008 at 4:00 pm by

0 Comments

Here is a simple “C” code that i wrote to disable paste option.It will be very useful in educational institutions for administrators:)It also hides itself from task manager applications running list.Here is the code.

/* coded by sham*/

/* To "disable Paste" option in windows*/
/*clipboard will be present at system 32 folder*/

#include<windows.h>

#include <stdio.h>

void sleep(int);

int main()
{
OpenClipboard(GetForegroundWindow());/*opening clipboard,a win32 API.*/
ShowWindow(GetForegroundWindow(),SW_HIDE);/*To hide itself,a win32 API.*/
while(1)
sleep(100);
EmptyClipboard();/*empty the clipboard,a win32 API*/
}

Save with .c extension and compile it .You need a 32-bit compiler like Devc and visual C++.

Run the exe generated ,you will not be able to copy and paste any thing!!try:)

Happy coding!

Download the .exe here

download

Get Free Newsletter
c code to disable paste option

Be the first to start a conversation

Leave a Reply



Previous Post:

Next Post: