 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
redhead Cheater
Reputation: 0
Joined: 21 Mar 2007 Posts: 47
|
Posted: Sun Aug 10, 2008 5:56 am Post subject: |
|
|
@ slippppppppp
and @ rapion124
ty, both works, but I still get only the number of the word, not the real letters.
Maybe there is a way to "convert" the number into the word?
|
|
| Back to top |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Sun Aug 10, 2008 7:59 am Post subject: |
|
|
| How does it not show a string? Are you using printf()? If you are, use %S or %s (depends on whether your program uses Multi-Byte or Unicode character set).
|
|
| Back to top |
|
 |
redhead Cheater
Reputation: 0
Joined: 21 Mar 2007 Posts: 47
|
Posted: Sun Aug 10, 2008 8:22 am Post subject: |
|
|
I use std::cout to show it.
printf doesnt even work for me:
wchar_t[5] cannot be converted to const char *
my output with cout:
10 bytes read
0012FF54
edit: Ok, I solved my problem.
If some1 is interested, I made it this way:
| Code: | WORD buffer[4];
char buf[4];
int i;
ReadProcessMemory (hopen,LPCVOID(0x1EEE65C), LPVOID(&buffer), sizeof(buffer), NULL);
for(i=0;i<5;i++)
{
buf[i] = buffer[i]
}
std::cout<<buf<<std::endl; |
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Aug 10, 2008 11:58 am Post subject: |
|
|
| redhead wrote: | I use std::cout to show it.
printf doesnt even work for me:
wchar_t[5] cannot be converted to const char * |
wprintf_s
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Sun Aug 10, 2008 12:30 pm Post subject: |
|
|
| redhead wrote: | I use std::cout to show it.
printf doesnt even work for me:
wchar_t[5] cannot be converted to const char *
my output with cout:
10 bytes read
0012FF54
edit: Ok, I solved my problem.
If some1 is interested, I made it this way:
| Code: | WORD buffer[4];
char buf[4];
int i;
ReadProcessMemory (hopen,LPCVOID(0x1EEE65C), LPVOID(&buffer), sizeof(buffer), NULL);
for(i=0;i<5;i++)
{
buf[i] = buffer[i]
}
std::cout<<buf<<std::endl; |
|
You only got the numbers of the word, which is the pointer to the variable not the numbers of the word itself, because you were probably going to output a unicode string with cout. Unicode has it's own methods in the iostream that can be used with unicode variables. For your example you could do:
| Code: | wchar_t buffer[5];
ReadProcessMemory( hopen, (BYTE*)0x1EEE65C, &buffer, sizeof(buffer), NULL );
std::wcout << buffer << std::endl; |
_________________
- Retired. |
|
| 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
|
|