Author Topic: ProcMem.h  (Read 5988 times)

galaxybeatzz

  • Guest
ProcMem.h
« on: February 26, 2015, 03:58:54 pm »
Hello everyone, I'm a newb...
So I started C++ a while ago and I tried to code something that reads memory, apperently I needed the files ProcMem.cpp and ProcMem.h for this... I downloaded these files and included the source file and the header, first a small error in my own code but then I fixed it. It seems that ProcMem.h is giving me an error so I have been troubleshooting somewhere else and EVERYONE tells me the issue is the compiler/Code::Blocks.
This is my ProcMem.h http://pastebin.com/cMV6ahKy
This is my error: http://gyazo.com/689e89e1b14c07bd2b7f1b63d224fc60
If this is the wrong section please mods do your work I'm new.

Offline pirx67

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: ProcMem.h
« Reply #1 on: February 28, 2015, 12:01:33 am »
Hi,

a note at first. From your source code I deduce you're running your stuff on Windows. My experience is at most with Linux and embedded systems therefore
take my hints with a grain of salt. Especially because you didn't tell us about your platform, the installed compiler and the Code::Blocks version.

Quote
So I started C++ a while ago and I tried to code something that reads memory, apparently I needed the files ProcMem.cpp and ProcMem.h for this...

Well from the code I deduce you want to read memory regions from a foreign process. Ok, googling around with "ProcMem.h ProcMem.cpp source code download microsoft" revealed that you apparently try to hack/cheat in a game (deduced from this http://www.mpgh.net/forum/showthread.php?t=915641 forum page).

Quote
This is my error: http://gyazo.com/689e89e1b14c07bd2b7f1b63d224fc60

After all let's look at the screen shot. From the format of the warning message ("[-Wunknown-pragmas]") I guess that you're using a GCC compiler under Windows. Either the bundled MinGW or a self installed TDM-GCC. If we look now at the source code we see:

Code
#pragma region TEMPLATE MEMORY FUNCTIONS
:
:
#pragma endregion

Be aware that #pragma directives are always compiler specific. From the fact that the used compiler complains about that I deduce that you're
using the wrong compiler for that source code. I would assume that these ProcMem.* stuff needs to be compiled with a Microsoft C++ compiler. I
also would guess that the error with "no matching function to call: ..." will disappear then. For the meaning of these pragmas you have to dig
in the Microsoft compiler documentation.

Keep in mind that Code::Blocks is only a graphical front-end for any installed command line compiler. You select from "Settings -> Compiler ..." which
compiler Code::Blocks should call for a project. So you have the opportunity to choose between different compilers on your machine that you have installed yourself in advance.

So install a Microsoft compiler and give it a try.

Regards,
    pirx67

PS: Please be aware that this forum is definitely only for the discussion of problems related to Code::Blocks and not for issues related to the
underlying compiler. Therefore this thread is off topic on this site and will probably soon be locked.

PPS: I would have been definitely much more helpful if you included the output from the Build log tab as text instead of posting
a screen shot. The right way to debug/report a compiler problem is described at http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F