Click here to Skip to main content
16,015,077 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalreading and outputting data from a binary file... Pin
Moochie521-Feb-05 14:36
Moochie521-Feb-05 14:36 
GeneralRe: reading and outputting data from a binary file... Pin
S. Senthil Kumar21-Feb-05 15:25
S. Senthil Kumar21-Feb-05 15:25 
GeneralRe: reading and outputting data from a binary file... Pin
Moochie521-Feb-05 17:47
Moochie521-Feb-05 17:47 
GeneralRe: reading and outputting data from a binary file... Pin
S. Senthil Kumar21-Feb-05 17:58
S. Senthil Kumar21-Feb-05 17:58 
GeneralRe: reading and outputting data from a binary file... Pin
Cedric Moonen21-Feb-05 20:13
Cedric Moonen21-Feb-05 20:13 
Generalprocesses Pin
mpapeo21-Feb-05 14:06
mpapeo21-Feb-05 14:06 
GeneralRe: processes Pin
Aamir Butt22-Feb-05 0:17
Aamir Butt22-Feb-05 0:17 
GeneralRe: processes Pin
mpapeo28-Feb-05 16:31
mpapeo28-Feb-05 16:31 
There is the code below
#include <windows.h>
#include <stdio.h>

//Program that creates a process
//This program assumes that numbers.exe is in the PATH!



int main(int argc, char **argv)
{




PROCESS_INFORMATION pi; /* filled in by CreateProcess */

STARTUPINFO si; /* startup info for the new process*/

/* print out our process ID */

printf("Process %d reporting for creation\n",GetCurrentProcessId());

/* Get startup info for current process, we will use this
as the startup info for the new process as well... */

GetStartupInfo(&si);

/* Call CreateProcess, telling it to run an exe file
with lots of defaults... (the NULLs mean "use defaults")
"\"F:\debug\numbers.exe\" -L",
*/

CreateProcess(NULL, /* lpApplicationName */
"numbers.exe", /* lpCommandLine assumes to use curent process directory*/
NULL, /* lpsaProcess */
NULL, /* lpsaThread */
FALSE, /* bInheritHandles */
CREATE_NEW_CONSOLE, /* dwCreationFlags */
NULL, /* lpEnvironment */
NULL, /* lpCurDir */
&si, /* lpStartupInfo */
&pi /* lpProcInfo */
);

/* print out the new process iD and quit
(does not wait for new process to exit!)
*/
printf("New Process ID: %d ",pi.dwProcessId);
printf("has started \n");


ReadProcessMemory(HANDLE, /*hProcess*/
LPCVOID, /*lpBaseAddress*/
LPVOID, /*lpBuffer*/
SIZE_T, /*nSize number of bytes to ead from process*/
SIZE_T* /*lpNumberOfBytesRead number of bytes transfered*/
);

printf("Process memory has read \n");
/*
WriteProcessMemory(
HANDLE, /* hProcess,*/
// LPVOID, /* lpBaseAddress*/
//LPCVOID, /* lpBuffer,*/
//SIZE_T, /* nSize,*/
//SIZE_T* /*lpNumberOfBytesWritten*/
//);



DWORD SuspendThread(HANDLE /*hThread*/
// );
// GetLastError(void);


return(0);
}
GeneralDialog Bars in Dialog Based applications Pin
Will115721-Feb-05 12:49
sussWill115721-Feb-05 12:49 
GeneralRe: Dialog Bars in Dialog Based applications Pin
Will115721-Feb-05 13:13
sussWill115721-Feb-05 13:13 
GeneralRe: Dialog Bars in Dialog Based applications Pin
JohnCz21-Feb-05 13:50
JohnCz21-Feb-05 13:50 
GeneralRe: Dialog Bars in Dialog Based applications Pin
Mohammad Tarik22-Feb-05 1:23
Mohammad Tarik22-Feb-05 1:23 
GeneralProblem With Dll Injection Pin
gamitech21-Feb-05 10:37
gamitech21-Feb-05 10:37 
Generalstart when cd is in Pin
jonavon blakly21-Feb-05 7:40
jonavon blakly21-Feb-05 7:40 
GeneralRe: start when cd is in Pin
Ravi Bhavnani21-Feb-05 7:44
professionalRavi Bhavnani21-Feb-05 7:44 
GeneralSafe Exit Pin
DanYELL21-Feb-05 6:36
DanYELL21-Feb-05 6:36 
GeneralRe: Safe Exit Pin
Michael Dunn21-Feb-05 6:53
sitebuilderMichael Dunn21-Feb-05 6:53 
GeneralStatic map Pin
ralfeus21-Feb-05 4:57
ralfeus21-Feb-05 4:57 
GeneralRe: Static map Pin
HalfWayMan21-Feb-05 5:15
HalfWayMan21-Feb-05 5:15 
GeneralRe: Static map Pin
ralfeus21-Feb-05 6:02
ralfeus21-Feb-05 6:02 
GeneralRe: Static map Pin
ThatsAlok21-Feb-05 5:16
ThatsAlok21-Feb-05 5:16 
QuestionHow to change color of button text ? Pin
scanf21-Feb-05 4:06
scanf21-Feb-05 4:06 
AnswerRe: How to change color of button text ? Pin
ThatsAlok21-Feb-05 4:56
ThatsAlok21-Feb-05 4:56 
GeneralRe: How to change color of button text ? Pin
scanf21-Feb-05 6:34
scanf21-Feb-05 6:34 
AnswerRe: How to change color of button text ? Pin
Ravi Bhavnani21-Feb-05 7:41
professionalRavi Bhavnani21-Feb-05 7:41 

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.