I successfully compiled the source code found here in
http://pastebin.com/1hPDib5w[
^]. Obviously I am trying to execute a process from memory given their full path.
In the main function i called the DoStuff function this way... DoStuff("C:\\Windows\\System32\\notepad.exe", "C:\\Windows\\System32\\calc.exe");
Now the program runs opens a blank command prompt (not to mention because of the cin.get()) but neither notepad nor calculator program opens. I checked the task manager weather any of these two process are running or not, but no they are not running. The only thing that i notice is that the output window in my MS VS 2010 Express displays these messages....
'RunFromMem.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'RunFromMem.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'RunFromMem.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'RunFromMem.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Cannot find or open the PDB file
'RunFromMem.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Cannot find or open the PDB file
'RunFromMem.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file
'RunFromMem.exe': Loaded 'ImageAtBase0xf60000', Loading disabled by Include/Exclude setting.
'RunFromMem.exe': Unloaded 'ImageAtBase0xf60000'
I checked about these msgs, people are suggesting that the symbol tables are not getting loaded properly.
What should I do to solve the problem? If there is any other better source code available then please suggest.
Thanks in advance.