Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: unique number Pin
Alexander M.,28-Mar-05 13:25
Alexander M.,28-Mar-05 13:25 
GeneralRe: unique number Pin
Shotgun28-Mar-05 13:34
Shotgun28-Mar-05 13:34 
GeneralRe: unique number Pin
Gary R. Wheeler28-Mar-05 15:38
Gary R. Wheeler28-Mar-05 15:38 
GeneralVC++.NET - Build vs Rebuild vs Clean Pin
JSadleir28-Mar-05 12:42
JSadleir28-Mar-05 12:42 
GeneralRe: VC++.NET - Build vs Rebuild vs Clean Pin
Alexander M.,28-Mar-05 13:29
Alexander M.,28-Mar-05 13:29 
GeneralShowing DLL function name references in Visual Studio Debugger Pin
ljr2428-Mar-05 12:20
ljr2428-Mar-05 12:20 
GeneralRe: Showing DLL function name references in Visual Studio Debugger Pin
Alexander M.,28-Mar-05 13:30
Alexander M.,28-Mar-05 13:30 
GeneralRestarting the process Pin
mpapeo28-Mar-05 12:03
mpapeo28-Mar-05 12:03 
I want to restart the process using the information of the previoulsy suspended process i.e. baseAddr,region,state, allocationbase, e.t.c but now i am stuck. It does not start even though i provided info from the file where it has to read from.
my restart function is below here. What am i missing...
<br />
<br />
case 6://restarting the process using information from the file<br />
<br />
lpBaseAddress = 0;<br />
hProcess = mbi.BaseAddress;<br />
SetThreadContext( <br />
hThread, <br />
lpContext <br />
);<br />
/*<br />
OpenThread(<br />
dwDesiredAccess,  // handle to thread<br />
bInheritHandle,  // access to process<br />
dwThreadId,<br />
GetLastError()   // pointer to handle to open access token<br />
);*/<br />
<br />
if (OpenProcess(dwDesiredAccess, bInheritHandle,dwThreadId, GetlastError()) == NULL) <br />
printf("Unable to open thread\n");<br />
				<br />
SuspendThread(pi.hThread);// identifies thread to suspend<br />
<br />
fp = fopen("info.bin","r");<br />
if( fp )<br />
nSize = 10000;	//numbers of bytes in the file<br />
lpBuffer =	0;	//pointer to the file where data is to be read<br />
<br />
WriteProcessMemory(<br />
dwDesiredAccess,		// handle to process whose memory is written to<br />
lpBaseAddress,	// address to start writing to<br />
lpBuffer,	// pointer to buffer to write data to<br />
nSize,		// number of bytes to write<br />
lpNumberOfBytesWritten  // actual number of bytes written<br />
);<br />
<br />
printf("Numbers of bytes writen: ",lpNumberOfBytesWritten);<br />
<br />
ResumeThread(dwDesiredAccess);// identifies thread to restart<br />
GetLastError();<br />
<br />
break;<br />
<br />


oam
GeneralModal Dialog not block user interation to CControlBar within App Pin
Art Poley28-Mar-05 10:37
Art Poley28-Mar-05 10:37 
GeneralRe: Modal Dialog not block user interation to CControlBar within App Pin
FlyingTinman28-Mar-05 12:43
FlyingTinman28-Mar-05 12:43 
GeneralRe: Modal Dialog not block user interation to CControlBar within App Pin
Art Poley29-Mar-05 2:57
Art Poley29-Mar-05 2:57 
GeneralInsert icon in menu Pin
luizferp28-Mar-05 9:47
luizferp28-Mar-05 9:47 
GeneralRe: Insert icon in menu Pin
Alexander M.,28-Mar-05 13:32
Alexander M.,28-Mar-05 13:32 
Generaltemplate questions Pin
act_x28-Mar-05 9:21
act_x28-Mar-05 9:21 
GeneralRe: template questions Pin
Joaquín M López Muñoz28-Mar-05 10:16
Joaquín M López Muñoz28-Mar-05 10:16 
GeneralRe: template questions Pin
act_x28-Mar-05 10:35
act_x28-Mar-05 10:35 
GeneralPlease help me! Pin
dSolariuM28-Mar-05 8:52
dSolariuM28-Mar-05 8:52 
GeneralRe: Please help me! Pin
David Crow28-Mar-05 9:25
David Crow28-Mar-05 9:25 
Questionmemcpy() not working ? Pin
Amarelia28-Mar-05 7:41
Amarelia28-Mar-05 7:41 
AnswerRe: memcpy() not working ? Pin
David Crow28-Mar-05 9:26
David Crow28-Mar-05 9:26 
GeneralRe: memcpy() not working ? Pin
Amarelia28-Mar-05 19:24
Amarelia28-Mar-05 19:24 
GeneralRe: memcpy() not working ? Pin
David Crow29-Mar-05 3:12
David Crow29-Mar-05 3:12 
GeneralProblems with HHOOK variable Pin
r3dqu33n28-Mar-05 7:08
r3dqu33n28-Mar-05 7:08 
GeneralRe: Problems with HHOOK variable Pin
David Crow28-Mar-05 9:35
David Crow28-Mar-05 9:35 
GeneralRe: Problems with HHOOK variable Pin
r3dqu33n28-Mar-05 9:45
r3dqu33n28-Mar-05 9:45 

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.