如果我在一个程序(比如: d:\start.exe)中调用CreateProcess创建一个进程(比如: c:\a.exe)
但在d盘中有a.exe需要的dll文件,怎样才能让d:\start.exe成功调用c:\a.exe
就好像c:\a.exe是在d:\下的一样.请高手解释,
谢谢!!
但在d盘中有a.exe需要的dll文件,怎样才能让d:\start.exe成功调用c:\a.exe
就好像c:\a.exe是在d:\下的一样.请高手解释,
谢谢!!
LPCTSTR lpApplicationName,
// pointer to name of executable module
LPTSTR lpCommandLine, // pointer to command line string
LPSECURITY_ATTRIBUTES lpProcessAttributes, // process security attributes
LPSECURITY_ATTRIBUTES lpThreadAttributes, // thread security attributes
BOOL bInheritHandles, // handle inheritance flag
DWORD dwCreationFlags, // creation flags
LPVOID lpEnvironment, // pointer to new environment block
LPCTSTR lpCurrentDirectory, // pointer to current directory name
LPSTARTUPINFO lpStartupInfo, // pointer to STARTUPINFO
LPPROCESS_INFORMATION lpProcessInformation // pointer to PROCESS_INFORMATION
);
LPCTSTR lpCurrentDirectory, // pointer to current directory name这个参数能设定新进程的运行路径,你可以设置这个参数让d:\start.exe成功调用c:\a.exe
就好像c:\a.exe是在d:\下的一样.