shell execute具有以下签名:
HINSTANCE ShellExecute(
__in_opt HWND hwnd,
__in_opt LPCTSTR lpOperation,
__in LPCTSTR lpFile,
__in_opt LPCTSTR lpParameters,
__in_opt LPCTSTR lpDirectory,
__in INT nShowCmd
);
如何使用lpparameters,我们可以在我的应用程序中处理参数吗?我正在执行应用程序,如下所示:
HINSTANCE hShellExecuteStatus = ShellExecute(NULL, "open", "MyPath/MyApp.EXE", NULL, NULL, SW_SHOWNORMAL);
我能在第4个参数中传递一些东西吗?例如:lpparameters,这样我就可以用myapp.exe来处理这个问题了,假设我正在传递“hi:in the 4th param:
HINSTANCE hShellExecuteStatus = ShellExecute(NULL, "open", "MyPath/MyApp.EXE", "Hi", NULL, SW_SHOWNORMAL);
我可以检查一下我的应用程序是否为hi并显示一条信息high吗?
我试过发邮件,但对shellexecute没有帮助