Call an .exe File
Cstring
Path, strsavefile;
: Getmodulefilename (null, path. getbuffer (max_path), max_path );
Path. releasebuffer ();
Path
=
Path. Left (path. reversefind ('//'));
Strsavefile. Format ("% S // update.exe", PATH );
Cstring
Strcmdparam;
Strcmdparam. Format ("% S %. 3f
% S // up // update. ini | stard ", thehostparam. m_strapptitle, thehostparam. m_fappver, cmainframe: m_taishandoc-> m_systeminitdata.netaddr );
: ShellExecute (
M_hwnd, "open", strsavefile, str1_param, null, sw_shownormal );
Update.exe receives the strcmdparam parameter:
1:/* cstring X;
X. Format ("% d, % s, % s,
% S ",__ argc ,__ argv [1] ,__ argv [2] ,__ argv [3]);
MessageBox (X );
*/
Cstring X;
X. Format ("% s" ,__ argv [3]);
Int
N = x. reversefind ('| ');
X =
X. Right (X. getlength ()-N-1 );
Afxmessagebox (X );
2:
Ccommandlineinfo
Raise Info;
Parsecommandline (partition info );
Using info. m_nshellcommand =
Ccommandlineinfo: filenew;
Cstring
Strfilename = policinfo. m_strfilename;
// Afxmessagebox (userid );
// Strfilename = "jnwinsideinfo.exe
| 20082008 ";
Int
IPOs = strfilename. reversefind ('| ');
If (IPOs>-1)
{
G_userid = strfilename. Right (strfilename. getlength ()-(IPOs + 1 ));
// Afxmessagebox (g_userid );
}