Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Hello I am having a problem

Hello I am having a problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpvisual-studiodebugging
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 14015010
    wrote on last edited by
    #1

    I am using visual c++.net 2010 I get these errors

    1>------ Build started: Project: last try, Configuration: Debug Win32 ------
    1> main.cpp
    1>c:\users\trogd\documents\visual studio 2010\projects\last try\last try\main.cpp(18): warning C4007: 'DllMain' : must be '__stdcall'
    1>LINK : fatal error LNK1561: entry point must be defined
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    and here is the code :) also please tell me what is wrong and how I can fix it. thanks!

    #include

    #define ADR_Test 0xB7CE50

    void HackThread()
    {
    for(;;)
    {

    	\*(DWORD\*)ADR\_Test = 100000;
    
    }
    Sleep(180);
    

    }

    BOOL DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID)
    {
    if(dwReason == DLL_PROCESS_ATTACH)
    {
    CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);

    }
    return TRUE;
    

    }

    D 1 Reply Last reply
    0
    • U User 14015010

      I am using visual c++.net 2010 I get these errors

      1>------ Build started: Project: last try, Configuration: Debug Win32 ------
      1> main.cpp
      1>c:\users\trogd\documents\visual studio 2010\projects\last try\last try\main.cpp(18): warning C4007: 'DllMain' : must be '__stdcall'
      1>LINK : fatal error LNK1561: entry point must be defined
      ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

      and here is the code :) also please tell me what is wrong and how I can fix it. thanks!

      #include

      #define ADR_Test 0xB7CE50

      void HackThread()
      {
      for(;;)
      {

      	\*(DWORD\*)ADR\_Test = 100000;
      
      }
      Sleep(180);
      

      }

      BOOL DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID)
      {
      if(dwReason == DLL_PROCESS_ATTACH)
      {
      CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);

      }
      return TRUE;
      

      }

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      wrote:

      BOOL DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID)

      Should be BOOL __stdcall DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID) or BOOL WINAPI DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID)

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups