MCPcopy Create free account
hub / github.com/acl-dev/acl / OnBnClickedOpenDos

Method OnBnClickedOpenDos

app/net_tools/net_toolsDlg.cpp:281–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281void Cnet_toolsDlg::OnBnClickedOpenDos()
282{
283 // TODO: �ڴ����ӿؼ�֪ͨ�����������
284 if (m_dosFp == NULL)
285 {
286 //GetDlgItem(IDC_OPEN_DOS)->EnableWindow(FALSE);
287 AllocConsole();
288 m_dosFp = freopen("CONOUT$","w+t",stdout);
289 printf("DOS opened now!\r\n");
290 const char* path = acl_getcwd();
291 printf("current path: %s\r\n", path);
292 GetDlgItem(IDC_OPEN_DOS)->SetWindowText("�ر� DOS ����");
293 acl::log::stdout_open(true);
294 logger_close();
295 }
296 else
297 {
298 fclose(m_dosFp);
299 m_dosFp = NULL;
300 FreeConsole();
301 GetDlgItem(IDC_OPEN_DOS)->SetWindowText("�� DOS ����");
302 acl::log::stdout_open(false);
303 const char* path = acl_getcwd();
304 acl::string logpath;
305 logpath.format("%s/net_tools.txt", path);
306 printf("current path: %s\r\n", path);
307 logger_open(logpath.c_str(), "net_tools");
308 }
309}
310
311void Cnet_toolsDlg::upload_report(const char* msg, size_t total,
312 size_t curr, const UPLOAD_METER& meter)

Callers

nothing calls this directly

Calls 4

acl_getcwdFunction · 0.85
logger_openFunction · 0.85
formatMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected