Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to convert a CString object to char array in VC++ MFC Pin
Joe Woodbury24-Jan-10 20:35
professionalJoe Woodbury24-Jan-10 20:35 
GeneralRe: How to convert a CString object to char array in VC++ MFC Pin
Member 439977124-Jan-10 21:31
Member 439977124-Jan-10 21:31 
GeneralRe: How to convert a CString object to char array in VC++ MFC Pin
Maya_24-Jan-10 22:28
Maya_24-Jan-10 22:28 
GeneralRe: How to convert a CString object to char array in VC++ MFC Pin
Member 439977125-Jan-10 0:18
Member 439977125-Jan-10 0:18 
GeneralRe: How to convert a CString object to char array in VC++ MFC Pin
Joe Woodbury25-Jan-10 7:42
professionalJoe Woodbury25-Jan-10 7:42 
GeneralRe: How to convert a CString object to char array in VC++ MFC Pin
Joe Woodbury25-Jan-10 7:01
professionalJoe Woodbury25-Jan-10 7:01 
AnswerRe: How to convert a CString object to char array in VC++ MFC Pin
Madan Chauhan25-Jan-10 0:32
Madan Chauhan25-Jan-10 0:32 
Questionquestion hooking virtual table / class functions Pin
nah133724-Jan-10 10:11
nah133724-Jan-10 10:11 
Hello community, ive got a problem i hooked a function that has virtual table inside it and calls other functions:

Decompailed with hex rayz :

signed int __cdecl sub_4594F5()<br />
{<br />
  signed int result; // eax@1<br />
<br />
  result = -691773993;<br />
  dword_4B0068 = (unsigned int)sub_40511C ^ 0xD6C45DD7; // i suppouse 0<br />
  dword_4B006C = (unsigned int)sub_438213 ^ 0xD6C45DD7; // 1<br />
  dword_4B0070 = (unsigned int)sub_424041 ^ 0xD6C45DD7; // 2<br />
  dword_4B0074 = (unsigned int)sub_42A4FC ^ 0xD6C45DD7; // 3<br />
  dword_4B0078 = (unsigned int)sub_410B73 ^ 0xD6C45DD7; // 4<br />
  dword_4B02F8 = (unsigned int)((char *)sub_416A34 + 4) ^ 0xD6C45DD7; // 5<br />
// the function list goes alot more on there like this around 50-60 funcs or more...<br />
<br />
  return result;<br />
}


This is second function from the virtual table that i want to hook

<br />
int (__cdecl*   pointermy_sub_438213)(int, int, int, int);<br />
<br />
 int __cdecl testmy_sub_438213(int a, int b, int c, int d)<br />
{<br />
<br />
return pointermy_sub_438213(a, b, c, d);<br />
	<br />
}





This is the hooked vtable func i used ms detours to hook it :

<br />
int (__cdecl* pPBVTBLsub_4594F5)();<br />
<br />
<br />
int __cdecl myPBVTBLsub_4594F5()<br />
{<br />
<br />
int dword_4B006C;<br />
dword_4B006C = (unsigned int)testmy_sub_438213 ^ 0xD6C45DD7;<br />
<br />
	return pPBVTBLsub_4594F5();<br />
}<br />
<br />



So in shortly the testmy_sub_438213 wont get hooked, so anyone knows what im doing wrong or mybe my aproach is false and this way cant be done vtable hooking any input is really welcome.
AnswerRe: question hooking virtual table / class functions Pin
Stuart Dootson24-Jan-10 11:54
professionalStuart Dootson24-Jan-10 11:54 
GeneralRe: question hooking virtual table / class functions Pin
nah133724-Jan-10 19:26
nah133724-Jan-10 19:26 
GeneralRe: question hooking virtual table / class functions Pin
Stuart Dootson24-Jan-10 20:40
professionalStuart Dootson24-Jan-10 20:40 
Questioniterator & operator overloading error Pin
khomeyni24-Jan-10 7:19
khomeyni24-Jan-10 7:19 
AnswerRe: iterator & operator overloading error Pin
Avi Berger24-Jan-10 7:31
Avi Berger24-Jan-10 7:31 
GeneralRe: iterator & operator overloading error Pin
khomeyni24-Jan-10 7:38
khomeyni24-Jan-10 7:38 
GeneralRe: iterator & operator overloading error Pin
Avi Berger24-Jan-10 8:29
Avi Berger24-Jan-10 8:29 
GeneralRe: iterator & operator overloading error Pin
khomeyni24-Jan-10 8:35
khomeyni24-Jan-10 8:35 
GeneralRe: iterator & operator overloading error Pin
khomeyni24-Jan-10 8:51
khomeyni24-Jan-10 8:51 
GeneralRe: iterator & operator overloading error Pin
Avi Berger24-Jan-10 8:55
Avi Berger24-Jan-10 8:55 
GeneralRe: iterator & operator overloading error Pin
khomeyni24-Jan-10 8:58
khomeyni24-Jan-10 8:58 
GeneralRe: iterator & operator overloading error Pin
Avi Berger24-Jan-10 9:10
Avi Berger24-Jan-10 9:10 
GeneralRe: iterator & operator overloading error Pin
khomeyni24-Jan-10 9:23
khomeyni24-Jan-10 9:23 
GeneralRe: iterator & operator overloading error Pin
khomeyni24-Jan-10 9:27
khomeyni24-Jan-10 9:27 
GeneralRe: iterator & operator overloading error Pin
Avi Berger24-Jan-10 9:35
Avi Berger24-Jan-10 9:35 
Questionwhat are these process with user name SYSTEM Pin
Joseph Marzbani24-Jan-10 5:20
Joseph Marzbani24-Jan-10 5:20 
AnswerRe: what are these process with user name SYSTEM Pin
«_Superman_»24-Jan-10 15:53
professional«_Superman_»24-Jan-10 15:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.