 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat Oct 04, 2008 11:29 pm Post subject: C++ some problems |
|
|
so im trying to use FillConsoleOutputCharacter with the value of a dword, but with no success, i tried converting it to a char array
| Code: | DWORD myte;
myte = 9;
char *mystring = (char*)&myte
FillConsoleOutputCharacter(outputhandle, mystring[1], 1, spot, &charwritten) |
but it didnt work, it prints an empty space
i know the actual writing is not the problem, since i have used many times before, but the converting doesnt seem to work properly
i also have a problem wiht this code:
| Code: | DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "PostMessageA")+5;
_declspec(naked) BOOL PostMessageX(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
_asm {
mov edi, edi
push ebp
mov ebp, esp
jmp[PMA]
}
} |
it says inline asm error, no opcode found in ebp, any ideas?
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sun Oct 05, 2008 11:14 am Post subject: |
|
|
You cannot just assign the string as the DWORD value, you must use a converting function.
_itot, _ltot, _itoa, etc.
And the inline asm error is coming from the fact that you don't have a space between "jmp" and "[PMA]"
| Code: | mov edi, edi
push ebp
mov ebp, esp
jmp dword ptr ds:[PMA] |
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Thu Oct 09, 2008 10:52 pm Post subject: |
|
|
ahh, i thought i would have to do something like that, though i never found the right one
thanks for the help (repped)
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|