Sunday, August 2, 2009

Explain this C program? I tried to compile using Turbo C but there are some errors i cant correct.?

#include %26lt;windows.h%26gt;


#include %26lt;conio.h%26gt;


#include %26lt;stdio.h%26gt;


#include%26lt;iostream.h%26gt;











int main()


{


printf("Press any key to continue...");


while(!kbhit());


MessageBox(0,"This file contains viruses.Do you want to quit execution.","ANTIVIRUS ALERT!!! ",MB_ICONSTOP);





system("rundll32.exe shell32.dll,SHExitWindowsEx 13");


getch();


}

Explain this C program? I tried to compile using Turbo C but there are some errors i cant correct.?
I don't think will work if is about the MS-DOS TurboC compiler - no windows.h right... ;-)





well...No errors under borland bcc32 compiler. When I run the exe is not shutting down the windows - Error in shell32.dll Missing entry: SHExitWindowsEx - as is suppose to do.
Reply:Ok... I don't know anything about C... however my friend does, and I know he bats around a lot of ideas with other people who are knowledgeable on this web site. Good luck!





http://www.thescripts.com/forum/thread26...
Reply:basically it does nothing, includes basic files, windows, input-output files, etc. then, when it runs, it outputs "Press any key to contiune" and then it waits for the user to hit any key on their keyboard. then it pops up a message box saying that the file contains viruses.
Reply:Turbo C is for... DOS am I correct? Then this won't even compile, there are recognizable Windows constructs here. And I believe int main() would need return 0; to go with it, except void main()
Reply:My turbo C is not great, but this looks like you are trying to write a program that will display a message that the file contains a virus and then shutdown the computer when the user presses a key. You must have a prank in mind.


No comments:

Post a Comment