|
I can tell by looking at it that isn't not a regular list view control.
|
|
|
|
|
it looks more like a grid than a listview.
|
|
|
|
|
The data in the center column is not aligned with it's header which show's that it's not a list view. Does Spy show you any of the messages that it may be processing?
You may also want to try using a resource editor to go snooping through the dll's for the exe. It may give you a better idea about what class is being used.
|
|
|
|
|
When clicking on the headers (Player, Chips, Rank) to sort the list or scrolling spy shows it as processing WM_PAINT and that's it.
|
|
|
|
|
Given that info and the name of the class, I would guess the control is custom. It could very well be a C++ class ( not MFC ) which draws everything to an offscreen buffer. The has hampered your ability to read the items.
Improbable, but you may want to snoop into some of the exported functions in the dlls, there could very well be a function there to get/add/remove the items. If so, you could hook the function.
I would hazard a guess that the list items is actually a bitmap, it may be possible to get a handle to it, but that would again be difficult.
Being that it's an online game, the list will be sent to the exe, you may want to start sniffing packets. It's doubtfull the full list will be sent each time, more like item by item possibly with a flag to add/remove/update. Also the list would probably be stored in the exe's memory as an array, you may want to snoop around for that.
We are now going into the world of reverse engineering, you could try debugging the exe. To do that though you will need to unpack/decrypt it somehow. There are a lot of tools to do this, but good luck trying to find one that will do it for you!
Out of curiosity, does the cursor change at all?
|
|
|
|
|
Packet sniffing was actually my first thought however I don't have much experience with reverse engineering so that left me a little short. Each time you open the window it recieves encrypted packets containing the information I'm trying to get (in full as far as I can tell). So I would imagine somewhere between being recieved as packets and coming up on the screen it has to be decrypted and stored somewhere, most likely as you pointed out in array form, so that the list can easily be sorted. I really don't have much of an idea as to how i'd go about finding that array or gathering the data from it though.
Nope the cursor doesn't change.
Also you can highlight individual names in the list (but not multiple names) and if you click the Player Info button (or just double click on the list) it pops up a seperate small window with the information i'm trying to read (albeit on a player by player basis). If I can't read the list directly perhaps there's a way I could enumerate each item in the list and read this small window that pops up?
-- modified at 14:46 Friday 8th December, 2006
|
|
|
|
|
Bump. Still haven't figured this out. I know there must be a way to do it as I've found a few commercial applications that seem to have no trouble with it (and don't use OCR). Any other ideas?
|
|
|
|
|
Hello,
I got a file (.INI) and it's filled with a lot of hexa numbers:
00000000
00000000
FFFFFC24
00000000
00000000
FFFFFC2C
00000000
FFFFFC70
FFFFFC24
I must convert these strings hex to real hex number, obviously they must be unsigned.
I tried a lot of ways, and got only trash
each line must be a row in an array, for example "unsigned int myArray[200];"
this array must be filled with hexa from the string (INI File).
Cuold anyone help me??
Thanks
|
|
|
|
|
suguimoto wrote: I tried a lot of ways, and got only trash
Have you tried strtol( const char *nptr, char **endptr, int base ) ?
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
can you show us what you tried, maybe then we could help you to correct it.
|
|
|
|
|
I aprreciate your effort to help me
so here is the code:
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
FILE *fp;
fp = fopen("file.ini", "rt");
char str[32];
unsigned int mem[9];
char * endptr;
for(int i = 0; i<9; i++){
fgets(str, 32, fp);
mem[i] = strtol(str, &endptr, 16);
printf("%i\n\r", mem[i]);
}
system("PAUSE");
return 0;
}
I'm a newbie in c++ and this seems to be a little bit hard for me.
my result:
0
0
2147483647
0
0
2147483647
0
2147483647
2147483647
2147483647(dec) is equal to 7FFFFFFF(hex) =/
whats happening? hehehe
Regards
|
|
|
|
|
suguimoto wrote: 2147483647(dec) is equal to 7FFFFFFF(hex)
Yes
|
|
|
|
|
You are reading 32 characters from the file, is this correct? If so then declare your str array to hold 33 to allow for the null terminator. What is the value of endptr at the end of each loop?
|
|
|
|
|
suguimoto wrote: whats happening?
strtol() is returning LONG_MAX because of overflow.
0xFFFFFC24 is too big to fit in a signed long.
Try strtoul()
|
|
|
|
|
suguimoto wrote: mem[i] = strtol(str, &endptr, 16);
Why aren't you using strtoul() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I changed to strtoul... and get the same result =/
also increased the size from 32 to 33, still get the same thing.
very weird.
But I'm still trying
|
|
|
|
|
suguimoto wrote: I changed to strtoul... and get the same result =/
How are you confirming that strtoul() is failing?
suguimoto wrote: also increased the size from 32 to 33, still get the same thing.
Why would you expect that to make a difference, since there are no more than 10 characters per line?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
suguimoto wrote: printf("%i\n\r", mem[i]);
Since mem[i] is an unsigned int , you should be using "%u" instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks!!
It's working!
I used %x to display everything as Hex, and it's working perfectly.
Thank you guys very much!!!
code:
int main(int argc, char* argv[])
{
FILE *fp;
fp = fopen("mem.ini", "rt");
char str[32];
unsigned int mem[8192];
char * endptr;
int teste;
for(int i = 0; i<8192; i++){
fgets(str, 32, fp);
mem[i] = strtoul(str, &endptr, 16);
printf("%x\n\r", mem[i]);
}
system("PAUSE");
return 0;
}
|
|
|
|
|
suguimoto wrote: for(int i = 0; i<8192; i++){
What if there are only 5, or 8193, lines in the file? It's not wise to hard-code such numbers.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
its must be huge. because it's simulating a memory in a "rom" inside a virtual processor.
i needed a function "readmemh" from verilog, but it couldnt be translated to c++, so i did it manually. this mem is going to be read a lot of times and changed a lot of times.
I think 8192 is fixed, as it was in Verilog. So i'm just gonna leave it like that
Thanks!!
|
|
|
|
|
Hello,
how to convert an CString to char* when the project is UNICODE defined?
My try is:
<code>
CString csPath = L"C:\\FolderName";
const char* acPath = (LPSTR)(LPCTSTR)csPath;
</code>
and acPath have only the first character!
thanks
break;
|
|
|
|
|
char* is ANSI
wchar_t* is UNICODE
TCHAR* is one or the other ( depending if UNICODE is defined )
change your char* to either wchar_t* or TCHAR* and it should work fine.
I would advice you to start using TCHAR and the _t**() macros, this will really help you to eliminate these prolems in the future.
|
|
|
|
|
Hello,
thanks for reply, i try to solve it!
have nice weekend!
regards
break;
|
|
|
|
|
break; wrote: acPath have only the first character!
That's because a cast isn't magic, the compiler can't read your mind and know "oh I should convert from Unicode to MBCS here". It's just doing what you've told it to. You end up with a const char* , pointing at something that is not a char , so naturally you get the wrong result.
Use the T2CA macro (or CT2CA if your compiler supports it) to do the conversion.
|
|
|
|