Disable paste option – ‘C’ code
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 raviraj*/
/* 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!
/* coded by raviraj*/
/* 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!
Tags: C coding
Subscribe to:
Post Comments (Atom)
Share your views...
0 Respones to "Disable paste option – ‘C’ code"
Post a Comment