Use Method of a defined class in an executable

2

All good, people? I am implementing some functionality here to a one game server, I have the PDB file where I can look for the OFFSETS.

I was able to reference the global functions by OFFSET this way:

Arquivo .cpp
pXXX YYY = (pXXX) 0x00403B7F;

Arquivo .h
typedef <tipo_retorno_função>(*pXXX)(<parâmetros>);
extern pXXX YYY;

The problem happened at the time I tried to reference a method of a class. From what I've been reading, it seems that the way to do this is different, but what I did not understand was: When I tried to reference Class 1 methods the way I described they worked correctly, but when I did in Class 2 the executable simply gave " crash ". One detail is that Class 1 has no constructor and Class 2 yes, all methods are public.

Can anyone help me? Thank you.

    
asked by anonymous 30.07.2015 / 13:57

1 answer

0

You can try to leave this method that you need to use in class 2 as static, so you do not have to instantiate the class to use it, just put the class name. MethodName. The c ++ language treats class classes and classes differently which represent programs, not being able to instantiate them

    
30.07.2015 / 15:25