Click here to Skip to main content
15,884,099 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerVC++ Pin
Gokulnath0072-Jan-11 19:50
Gokulnath0072-Jan-11 19:50 
GeneralRe: VC++ Pin
ShilpiP2-Jan-11 20:05
ShilpiP2-Jan-11 20:05 
QuestionRe: VC++ Pin
David Crow3-Jan-11 3:19
David Crow3-Jan-11 3:19 
QuestionUrgent: RS232 Hyperterminal communicator with Visual C++ Pin
ad-xing2-Jan-11 16:34
ad-xing2-Jan-11 16:34 
AnswerRe: Urgent: RS232 Hyperterminal communicator with Visual C++ Pin
Shivanand Gupta2-Jan-11 20:40
Shivanand Gupta2-Jan-11 20:40 
GeneralRe: Urgent: RS232 Hyperterminal communicator with Visual C++ Pin
ad-xing2-Jan-11 20:54
ad-xing2-Jan-11 20:54 
AnswerRe: Urgent: RS232 Hyperterminal communicator with Visual C++ Pin
Luc Pattyn2-Jan-11 22:45
sitebuilderLuc Pattyn2-Jan-11 22:45 
QuestionHello i hooked readprocessmemory and have some problems logging its lpBuffer Pin
nah13371-Jan-11 19:26
nah13371-Jan-11 19:26 
Hi, the problem is that the bytes what i get logged are disordered and not in proper row and somehow they are even splited.
I used apimonitorig software and monitored readprocessmemory and sawed that it holds byte rows for sure this was the output from apimonitorig software : lpBuffer 0x014D0020: {4D 5A 90 00 03 00 00 00 04 00 00 00


This is my hooked readprocessmemory where i am trying to log the lpBuffer what is holding byte rows.



BOOL (__stdcall* pReadProcessMemory)(HANDLE hProcess, LPCVOID lpBaseAddress, LPVOID lpBuffer, SIZE_T nSize, SIZE_T *lpNumberOfBytesRead);
BOOL __stdcall hookedReadProcessMemory(HANDLE hProcess, LPCVOID lpBaseAddress, LPVOID lpBuffer, SIZE_T nSize, SIZE_T *lpNumberOfBytesRead)
{
     
	    bool returning = pReadProcessMemory(hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead);
	   
            char* mybytes = (char*)lpBuffer;
	 
	    for (int i = 0; i < nSize; i++)


            Log( "lpBuffer: %x   \n", mybytes[i]);
	
            return returning;
	     
}


And the log output is like this:
    lpBuffer: 4d

lpBuffer: 5a

lpBuffer: ffffff90

lpBuffer: 0

lpBuffer: 3

lpBuffer: 0

lpBuffer: 0

lpBuffer: 0

lpBuffer: 4

lpBuffer: 0

lpBuffer: 0

lpBuffer: 0

lpBuffer: ffffffff

lpBuffer: ffffffff

lpBuffer: 0

lpBuffer: 0

lpBuffer: ffffffb8



Please help what i am doing wrong im out of ideas
AnswerRe: Hello i hooked readprocessmemory and have some problems logging its lpBuffer Pin
Richard MacCutchan1-Jan-11 21:40
mveRichard MacCutchan1-Jan-11 21:40 
GeneralRe: Hello i hooked readprocessmemory and have some problems logging its lpBuffer Pin
nah13371-Jan-11 21:46
nah13371-Jan-11 21:46 
GeneralRe: Hello i hooked readprocessmemory and have some problems logging its lpBuffer Pin
Richard MacCutchan1-Jan-11 22:05
mveRichard MacCutchan1-Jan-11 22:05 
GeneralRe: Hello i hooked readprocessmemory and have some problems logging its lpBuffer Pin
nah13371-Jan-11 22:16
nah13371-Jan-11 22:16 
GeneralRe: Hello i hooked readprocessmemory and have some problems logging its lpBuffer Pin
Richard MacCutchan2-Jan-11 1:10
mveRichard MacCutchan2-Jan-11 1:10 
QuestionLPCWSTR Problem.? Pin
goldenrose91-Jan-11 19:24
goldenrose91-Jan-11 19:24 
AnswerRe: LPCWSTR Problem.? Pin
Richard MacCutchan2-Jan-11 1:14
mveRichard MacCutchan2-Jan-11 1:14 
AnswerRe: LPCWSTR Problem.? Pin
User 74293382-Jan-11 3:47
professionalUser 74293382-Jan-11 3:47 
GeneralRe: LPCWSTR Problem.? Pin
CPallini2-Jan-11 5:03
mveCPallini2-Jan-11 5:03 
GeneralRe: LPCWSTR Problem.? Pin
Stefan_Lang9-Jan-11 23:54
Stefan_Lang9-Jan-11 23:54 
GeneralRe: LPCWSTR Problem.? Pin
CPallini10-Jan-11 0:21
mveCPallini10-Jan-11 0:21 
GeneralRe: LPCWSTR Problem.? Pin
Stefan_Lang10-Jan-11 0:45
Stefan_Lang10-Jan-11 0:45 
GeneralRe: LPCWSTR Problem.? Pin
CPallini10-Jan-11 0:58
mveCPallini10-Jan-11 0:58 
GeneralRe: LPCWSTR Problem.? [modified] Pin
Stefan_Lang10-Jan-11 2:44
Stefan_Lang10-Jan-11 2:44 
AnswerRe: LPCWSTR Problem.? [updated] Pin
CPallini2-Jan-11 5:12
mveCPallini2-Jan-11 5:12 
GeneralRe: LPCWSTR Problem.? Pin
Sauro Viti2-Jan-11 5:39
professionalSauro Viti2-Jan-11 5:39 
GeneralRe: LPCWSTR Problem.? Pin
CPallini2-Jan-11 5:59
mveCPallini2-Jan-11 5:59 

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.