Results 1 to 5 of 5
  1. #1
    Felipeb18's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    6

    Need help on simple code

    Guys, my compiler is saying that is an error in the code that I created

    Here is the error log:

    Code:
    1>------ Build started: Project: This, Configuration: Debug Win32 ------
    1>Linking...
    1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    1>C:\Users\Familia Belem\Documents\Visual Studio 2008\Projects\Project1\This\Debug\This.exe : fatal error LNK1120: 1 unresolved externals
    1>Build log was saved at "file://c:\Users\Familia Belem\Documents\Visual Studio 2008\Projects\Project1\This\This\Debug\BuildLog.htm"
    1>This - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Code:
    Code:
    #include <windows.h>    
    
    
    int WINAPI Main(HINSTANCE hInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpCmdLine,
                    int nShowCmd)
    {
        MessageBox(NULL,
                   L"Hack criado no dia 06/01/10",
                   L"Felipeb18's hack",
                   MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }
    Plz help me!!!

  2. #2
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    int WINAPI WinMain(don't know the exact params off the top of my head) or int main()
    Ah we-a blaze the fyah, make it bun dem!

  3. #3
    Felipeb18's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    6
    What do u mean?

  4. #4
    B1ackAnge1's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    455
    Reputation
    74
    Thanks
    344
    My Mood
    Cynical
    instead of
    int WINAPI Main(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd)


    use:

    int WINAPI WinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd)

  5. The Following User Says Thank You to B1ackAnge1 For This Useful Post:

    Felipeb18 (01-07-2010)

  6. #5
    Felipeb18's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    6
    Ive already tried this.
    But I think its something wrong with the header because any code that i put using windows.h is giving the same error

Similar Threads

  1. [Help Request] need help with injecting code/using it
    By 0xx-kyle-xx0 in forum Combat Arms Help
    Replies: 1
    Last Post: 06-17-2018, 12:02 PM
  2. [HELP] I NEED HELP WITH STAMINA CODE
    By ilovepie21 in forum Visual Basic Programming
    Replies: 15
    Last Post: 03-03-2008, 07:41 PM
  3. need help with teleport code
    By konni in forum WarRock - International Hacks
    Replies: 0
    Last Post: 07-29-2007, 11:07 PM
  4. need help plz vb6 codeing fast registration
    By cjg333 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 07-05-2007, 06:38 AM
  5. NEED help with verification code when registering!
    By vinogradov in forum WarRock Korea Hacks
    Replies: 2
    Last Post: 05-30-2007, 07:20 PM