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

C / C++ / MFC

 
GeneralOfftopic Pin
Nelek28-Nov-07 3:13
protectorNelek28-Nov-07 3:13 
GeneralRe: Offtopic Pin
toxcct28-Nov-07 3:18
toxcct28-Nov-07 3:18 
GeneralRe: Offtopic Pin
Nelek28-Nov-07 21:43
protectorNelek28-Nov-07 21:43 
GeneralRe: Offtopic Pin
toxcct28-Nov-07 21:47
toxcct28-Nov-07 21:47 
QuestionConsult the issue of Win API routine address and code injection Pin
Jude Deng27-Nov-07 23:04
Jude Deng27-Nov-07 23:04 
AnswerRe: Consult the issue of Win API routine address and code injection [modified] Pin
maciu202028-Nov-07 0:20
maciu202028-Nov-07 0:20 
GeneralRe: Consult the issue of Win API routine address and code injection Pin
Jude Deng28-Nov-07 14:48
Jude Deng28-Nov-07 14:48 
GeneralRe: Consult the issue of Win API routine address and code injection Pin
maciu202028-Nov-07 23:15
maciu202028-Nov-07 23:15 
Actually the address may vary, windows sets it while loading kernel32.dll.
But on each machine, all processes share kernel32.dll functions' addresses.
DWORD __stdcall RemoteThreadProc(LPVOID lParam)<br />
{<br />
  __asm<br />
  {<br />
    push 0<br />
    call DWORD PTR LoadLibrary<br />
  }<br />
}

should be ok...as long as you compile your program with optimizations on.
It would be definitely OK if you wrote the whole thing in assembly to ensure that compiler won't insert there something you don't want it to.
push 0<br />
call DWORD PTR LoadLibrary<br />
retn 0

generates the same code, no matter where it's placed.

If it still doesn't work, can you disassembly RemoteThreadProc and post here?
QuestionRe: Consult the issue of Win API routine address and code injection Pin
David Crow29-Nov-07 2:43
David Crow29-Nov-07 2:43 
AnswerRe: Consult the issue of Win API routine address and code injection Pin
maciu202029-Nov-07 9:47
maciu202029-Nov-07 9:47 
AnswerRe: Consult the issue of Win API routine address and code injection Pin
Jude Deng29-Nov-07 13:26
Jude Deng29-Nov-07 13:26 
QuestionRe: Consult the issue of Win API routine address and code injection Pin
David Crow30-Nov-07 2:40
David Crow30-Nov-07 2:40 
QuestionOpening and reading XML files in MFC (C++) Pin
MrFloyd200927-Nov-07 23:01
MrFloyd200927-Nov-07 23:01 
AnswerRe: Opening and reading XML files in MFC (C++) Pin
toxcct27-Nov-07 23:06
toxcct27-Nov-07 23:06 
GeneralRe: Opening and reading XML files in MFC (C++) Pin
MrFloyd200927-Nov-07 23:26
MrFloyd200927-Nov-07 23:26 
GeneralRe: Opening and reading XML files in MFC (C++) Pin
ThatsAlok27-Nov-07 23:28
ThatsAlok27-Nov-07 23:28 
GeneralRe: Opening and reading XML files in MFC (C++) Pin
toxcct27-Nov-07 23:29
toxcct27-Nov-07 23:29 
AnswerRe: Opening and reading XML files in MFC (C++) Pin
Hamid_RT27-Nov-07 23:44
Hamid_RT27-Nov-07 23:44 
QuestionProbllem related to recv() function in winsock.h header fle Pin
Raghavendra Pise27-Nov-07 22:47
Raghavendra Pise27-Nov-07 22:47 
AnswerRe: Probllem related to recv() function in winsock.h header fle Pin
led mike28-Nov-07 4:53
led mike28-Nov-07 4:53 
AnswerRe: Probllem related to recv() function in winsock.h header fle Pin
Mark Salsbery28-Nov-07 5:47
Mark Salsbery28-Nov-07 5:47 
Questionhow to read event log Pin
T@su27-Nov-07 22:39
T@su27-Nov-07 22:39 
AnswerRe: how to read event log Pin
Hamid_RT27-Nov-07 23:40
Hamid_RT27-Nov-07 23:40 
GeneralRe: how to read event log Pin
T@su28-Nov-07 1:07
T@su28-Nov-07 1:07 
GeneralRe: how to read event log Pin
David Crow28-Nov-07 3:13
David Crow28-Nov-07 3:13 

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.