September 1st, 2003, 10:37 AM
You have program A: when user runs it, the user can type in info like name/age/location.. etc, when user presses `ok`, program A opens up another program, lets say program B, and at the END of that program, it writes what the user put, like "john22california".
Program B: when this program is ran, it will read the last X number of bytes, and then print out that info..
problems with that:
program B needs to know how many bytes to read.. one thing you can do is, reserve the last 6 bytes, to store the # of bytes written, so in the bottom of program B.. itll look like "john22california000016" program B will read the last 6 bytes, and get "000016".. and then it reads 16 bytes before the last 6 and that's the info.
You can store program B inside a resource.
September 1st, 2003, 10:50 AM
ok. so how can i execute the program out from the resource?
September 1st, 2003, 10:52 AM
September 1st, 2003, 08:17 PM
Anyone can help? By the way, how to write the program to disk from memory?
Last edited by rickykoh1983; September 1st, 2003 at 10:43 PM.
September 2nd, 2003, 04:38 AM
This is part of my code:
hExe = LoadLibrary("Locker.EXE");
hRes = FindResource(hExe, "IDD_EXE1", RT_RCDATA);
hResLoad = LoadResource(hExe, hRes);
lpResLock = LockResource(hResLoad);
HANDLE hFile = CreateFile(_T("C:\\Testing.EXE"),
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
What is wrong with this code?
September 2nd, 2003, 10:33 PM
Is it that no one wants to help?