Solved hi i seem to have a issue with a part of my code the issue is with do

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

tocogames

Newbie
Full Member
May 24, 2016
15
74
0
C++:
DWORD ModuleGry(LPSTR Viiper)
{
    ModuleEntry.dwSize = sizeof(MODULEENTRY32);
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, ProcessID)

do
  {
      if (!strcmp(ModuleEntry.szModule,Viiper))
      {
        CloseHandle(hSnap);

        return (DWORD)ModuleEntry.modBaseAddr;

      }
  } while (Module32Next(hSnap, &ModuleEntry))

        CloseHandle(hSnap)
     std::cout<< "not able to access to Process!/Run Hack as Administrator!";
     Sleep(7000);
     exit(1);
 }

#pragma region SDK
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,101
78,998
2,374
Www.learncpp.com

Please stop hacking and learn c++ for a few weeks

How to Hack Any Game pt 2 Rake
 
Last edited:

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
you've given 0 indication as to what the problem is.

But being as i'm going to guess you're new to CPP, im also going to guess the issue is that your project settings aren't set to multibyte, which means your LPSTR is most likely a wchar_t instead of a char * and you're not using the relevant string functions for it
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,101
78,998
2,374
I know c++
C++:
DWORD_PTR dwGetModuleBaseAddress(DWORD dwProcID, const wchar_t * szModuleName)
{
    DWORD_PTR dwModuleBaseAddress = 0;
    HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, dwProcID);
    if (hSnapshot != INVALID_HANDLE_VALUE)
    {
        MODULEENTRY32 ModuleEntry32;
        ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
        if (Module32First(hSnapshot, &ModuleEntry32))
        {
            do
            {
                if (wcscmp(ModuleEntry32.szModule, szModuleName) == 0)
                {
                    dwModuleBaseAddress = (DWORD_PTR)ModuleEntry32.modBaseAddr;
                    break;
                }
            } while (Module32Next(hSnapshot, &ModuleEntry32));
        }
        CloseHandle(hSnapshot);
    }
    return dwModuleBaseAddress;
}
 

FloppyWhale

Jr.Coder
Full Member
Nobleman
Jan 12, 2015
65
308
0
Rake;43146 said:
C++:
DWORD_PTR dwGetModuleBaseAddress(DWORD dwProcID, const wchar_t * szModuleName)
{
    DWORD_PTR dwModuleBaseAddress = 0;
    HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, dwProcID);
    if (hSnapshot != INVALID_HANDLE_VALUE)
    {
        MODULEENTRY32 ModuleEntry32;
        ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
        if (Module32First(hSnapshot, &ModuleEntry32))
        {
            do
            {
                if (wcscmp(ModuleEntry32.szModule, szModuleName) == 0)
                {
                    dwModuleBaseAddress = (DWORD_PTR)ModuleEntry32.modBaseAddr;
                    break;
                }
            } while (Module32Next(hSnapshot, &ModuleEntry32));
        }
        CloseHandle(hSnapshot);
    }
    return dwModuleBaseAddress;
}
Mind = Blown.
 

Lovelace

Jr.Coder
Full Member
Nobleman
Oct 23, 2015
83
938
5
Hasn't anyone noticed the missing semicolons on lines 4, 15, and 17? :FeelsBadMan:
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods