パスワード付きのRPX Packerによって圧縮および保護されたdotnet winformアプリケーションがあります。アプリケーションは、Windows コマンド プロンプトから、コマンド ライン引数としてパスワードを指定して開くことができます (例: MyApp.exe )。コマンド プロンプトの代わりに、ネイティブ C++ アプリケーションから dotnet アプリを起動したいと考えています。パスワードなしで動作する次のコードを試しましたが、パスワードを使用すると暗号化エラーが発生します。
#include "stdafx.h"
#include "windows.h"
#include "shellapi.h"
int _tmain(int argc, _TCHAR* argv[])
{
SHELLEXECUTEINFO shExecInfo;
shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shExecInfo.fMask = NULL;
shExecInfo.hwnd = NULL;
shExecInfo.lpVerb = L"runas";
shExecInfo.lpFile = L"MyApp.exe";
shExecInfo.lpParameters = L"password";
shExecInfo.lpDirectory = NULL;
shExecInfo.nShow = SW_NORMAL;
shExecInfo.hInstApp = NULL;
ShellExecuteEx(&shExecInfo);
return 0;
}
どうすればこれを達成できますか?