| 279 | } |
| 280 | |
| 281 | void 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 | |
| 311 | void Cnet_toolsDlg::upload_report(const char* msg, size_t total, |
| 312 | size_t curr, const UPLOAD_METER& meter) |
nothing calls this directly
no test coverage detected