Void coutrundlgdlg: onrun ()
{
Cstring pszdllname = "shell32.dll ";
Hinstance hlib =: loadlibrary (pszdllname );
Typedef void (_ stdcall * prunfiledlg) (hwnd, hicon, lpctstr, uint );
Prunfiledlg runfiledlg;
If (hlib = NULL)
{
Return;
}
Runfiledlg = (prunfiledlg) getprocaddress (hlib, (char *) 61 );
Cstring name = "Running wolfbaby ";
Cstring SSS = "Input Program path ";
Lpwstr wname = new wchar [100];
Lpwstr wsss = new wchar [100];
Memset (wname, 0, sizeof (wchar) * 100 );
Memset (wsss, 0, sizeof (wchar) * 100 );
Multibytetowidechar (cp_acp,
Mb_precomposed, // character-type options
Name, // address of string to map
Name. getlength (), // number of bytes in string
Wname, // address of Wide-Character Buffer
100
);
Multibytetowidechar (cp_acp,
Mb_precomposed, // character-type options
SSS, // address of string to map
Sss. getlength (), // number of bytes in string
Wsss, // address of Wide-Character Buffer
100
);
If (runfiledlg! = NULL)
{
Runfiledlg (this-> getsafehwnd (), null, null, (lpctstr) wname, (lpctstr) wsss, 0x02 );
}
: Freelibrary (hlib );
Delete [] wname;
Delete [] wsss;
}
Void coutrundlgdlg: onrestar ()
{
Cstring pszdllname = "shell32.dll ";
Hinstance hlib =: loadlibrary (pszdllname );
Typedef void (_ stdcall * prunfiledlg) (hwnd, lpctstr, uint );
Prunfiledlg runfiledlg;
If (hlib = NULL)
{
Return;
}
Runfiledlg = (prunfiledlg) getprocaddress (hlib, (char *) 59 );
Cstring name = "wolfbaby restart ";
Wchar_t * wname = new wchar [100];
Memset (wname, 0, sizeof (wchar) * 100 );
Multibytetowidechar (cp_acp,
Mb_precomposed, // character-type options
Name, // address of string to map
Name. getlength (), // number of bytes in string
Wname, // address of Wide-Character Buffer
100
);
If (runfiledlg! = NULL)
{
Runfiledlg (this-> getsafehwnd (), (lpctstr) wname, 0x02 );
}
: Freelibrary (hlib );
Delete [] wname;
}