微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

拆分可执行文件path和参数

我需要能够分割命令中的可执行文件path和参数。

Windows轻松处理以下内容

“notepad.exe C: testfile.txt”

“记事本c: testfolder versioninfo.txt”

使用Windows传真服务器扩展发送传真 – faxcomexlib

以编程方式启用Windowsfunction的最佳方法是什么?

通过Linux和Mono编写.NET for Windows

与应用程序一起存储数据的最快方式是什么?

如何使应用程序运行在任何Windows版本没有额外的库?

“C: Windows notepad.exe”“C: test folder versioninfo.txt”

rundll“C Windows somelibrary.dll”

任何人都有一段代码来parsing这样的string?

谢谢。

在registry中创build子上下文菜单

在屏幕上自动点击鼠标

GetSystemTimeZones缺lessGMT标准时间

如何在一个应用程序中透明地将多个.Net版本定位到用户

CoWaitForMultipleHandles API的行为不像logging

以前我用过这样的东西:

char* lpCmdLine = ...; char* lpArgs = lpCmdLine; // skip leading spaces while(isspace(*lpArgs)) lpArgs++; if(*lpArgs == '"') { // executable is quoted; skip to first space after matching quote lpArgs++; int quotes = 1; while(*lpArgs) { if(isspace(*lpArgs) && !quotes) break; if(*lpArgs == '"') quotes = !quotes; } } else { // executable is not quoted; skip to first space while(*lpArgs && !isspace(*lpArgs)) lpArgs++; } // Todo: skip any spaces before the first arg

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐