Quell
December 19th, 2004, 11:23 AM
HEy.
i need to run a program with sertain parameters.
So i execute the program using CreateProcess:
BOOL CreateProcess(
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
I put the parameters into lpCommandLine.
But hte process that i make doesn';t execute them. If i amke a shortcut of the program adn add those parameters there it workes...but if i want to do it from a program....doesn't do it....
here is the code with the parameter pushign and all....
am i missing something?
reateProcess(exename, "-asm primary.exe", 0, 0, FALSE, DEBUG_ONLY_THIS_PROCESS,0, 0, &sInfo, &pInfo);
I knwo that the parameter work, beucase they work when i use a shortcut and add them to teh end.
Any ideas where i screwed up? thx
i need to run a program with sertain parameters.
So i execute the program using CreateProcess:
BOOL CreateProcess(
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
I put the parameters into lpCommandLine.
But hte process that i make doesn';t execute them. If i amke a shortcut of the program adn add those parameters there it workes...but if i want to do it from a program....doesn't do it....
here is the code with the parameter pushign and all....
am i missing something?
reateProcess(exename, "-asm primary.exe", 0, 0, FALSE, DEBUG_ONLY_THIS_PROCESS,0, 0, &sInfo, &pInfo);
I knwo that the parameter work, beucase they work when i use a shortcut and add them to teh end.
Any ideas where i screwed up? thx