关于msdn中CreateProcess函数说明的注释
2012-11-20 17:43
344 查看
msdn中CreateProcess函数关于lpApplicationName参数的说明里面有这么一段话
The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the function uses the current drive and current directory to complete the specification. The function will not use the
search path. If the file name does not contain an extension, .exe is assumed. Therefore, if the file name extension is .com, this parameter must include the .com extension. [1]
但是实际测试表明并不会有默认的.exe的扩展名的
[1]ms-help://MS.MSDNQTR.v90.en/dllproc/base/createprocess.htm
[2]测试环境:windows xp sp2 + vs2008 sp1
The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the function uses the current drive and current directory to complete the specification. The function will not use the
search path. If the file name does not contain an extension, .exe is assumed. Therefore, if the file name extension is .com, this parameter must include the .com extension. [1]
但是实际测试表明并不会有默认的.exe的扩展名的
#include <windows.h> int main() { STARTUPINFO si = { 0 }; si.cb = sizeof(STARTUPINFO); PROCESS_INFORMATION pi = { 0 }; CreateProcess(L"D:\\a.exe",NULL,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); // 成功 //CreateProcess(L"D:\\a",NULL,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); // 不成功 CloseHandle(pi.hProcess); return 0; }
[1]ms-help://MS.MSDNQTR.v90.en/dllproc/base/createprocess.htm
[2]测试环境:windows xp sp2 + vs2008 sp1
相关文章推荐
- 关于msdn中NtQuerySystemInformation函数说明
- 关于msdn中NtQuerySystemInformation函数说明
- 关于创建进程函数CreateProcess()字符串参数的说明
- 关于printf()函数的点(还有各种各样的转换说明等你发现哦~)
- 关于CreateProcess 函数的两种版本问题
- [转]inline,__inline,__forceinline 关于函数内联及相关关键字的详细说明
- 关于怎么修改供应商状态的函数说明
- 关于ATL自动生成的事件激发函数Fire_XXX(...)的代码说明
- 关于C语言中一些常用函数的说明
- 代码编写中关于文件/函数注释的统一格式
- 深度学习 7. MatConvNet 相关函数解释说明,MatConvNet 代码理解(三)cnn_mnist_experiments.m 的注释
- 关于Java函数传参以及参数在函数内部改变的问题——JAVA值传递与引用最浅显的说明!
- 关于epoll中的read函数说明
- W32下关于位图载入的一些函数的说明
- 关于free()函数的一些说明
- msdn中关于TimeSetEvent回调函数的说明
- 深度学习 6. MatConvNet 相关函数解释说明,MatConvNet 代码理解(二)cnn_mnist_init.m 的注释
- [Android] Android Stuio 在函数前面快速生成说明注释和参数注释的方法
- 守护进程 关于setsid() 函数的说明
- stl(三)------这是一个MSDN中的一个关于map 中find函数的说明 很好的一个例子