CreateProcess能执行word文件(非EXE)吗?(30分)

  • 主题发起人 主题发起人 happygb
  • 开始时间 开始时间
H

happygb

Unregistered / Unconfirmed
GUEST, unregistred user!
CreateProcess能执行word文件,我写的怎么不行?
 
这个问题用过的人应该知道吧,怎么没有人回答啊
 
“word文件(非EXE)”是虾米以西?
 
就是说象word文件这样的非exe文件
 
to happygb:<br>根据CreateProcess函数的解释&quot;The CreateProcess function creates a new process and its primary thread. The new process executes the specified executable file.&quot;应该是不行的,要打开你所说的文件,可以用如下函数:<br>uses shellapi<br>shellexecute(handle,'open','1.doc',nil,nil,SW_SHOW);
 
可以,加参
 
to WickedladII:CreateProcess该怎么做呢?
 
to WickedladII:CreateProcess该怎么设置参数呢?
 
BOOL CreateProcess(<br><br> &nbsp; &nbsp;LPCTSTR lpApplicationName, // pointer to name of executable module <br> &nbsp; &nbsp;LPTSTR lpCommandLine, // pointer to command line string<br> &nbsp; &nbsp;LPSECURITY_ATTRIBUTES lpProcessAttributes, // pointer to process security attributes <br> &nbsp; &nbsp;LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to thread security attributes <br> &nbsp; &nbsp;BOOL bInheritHandles, // handle inheritance flag <br> &nbsp; &nbsp;DWORD dwCreationFlags, // creation flags <br> &nbsp; &nbsp;LPVOID lpEnvironment, // pointer to new environment block <br> &nbsp; &nbsp;LPCTSTR lpCurrentDirectory, // pointer to current directory name <br> &nbsp; &nbsp;LPSTARTUPINFO lpStartupInfo, // pointer to STARTUPINFO <br> &nbsp; &nbsp;LPPROCESS_INFORMATION lpProcessInformation // pointer to PROCESS_INFORMATION &nbsp;<br> &nbsp; );<br>帮顶,我也想知道.
 
to WickedladII:开指点一下吧
 
多人接受答案了。
 
后退
顶部