MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / HandleDroppedFile

Method HandleDroppedFile

DebugView++/MainFrame.cpp:462–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void CMainFrame::HandleDroppedFile(const std::wstring& file)
463{
464 if (!IsPaused()) Pause();
465 SetTitle(file);
466 using boost::algorithm::iequals;
467 auto ext = std::experimental::filesystem::path(file).extension().wstring();
468 if (iequals(ext, L".exe"))
469 {
470 m_logSources.AddMessage(stringbuilder() << "Started capturing output of " << Str(file) << "\n");
471 Run(file);
472 }
473 else if (iequals(ext, L".cmd") || iequals(ext, L".bat"))
474 {
475 m_logSources.AddMessage(stringbuilder() << "Started capturing output of " << Str(file) << "\n");
476 m_logSources.AddProcessReader(L"cmd.exe", wstringbuilder() << L"/Q /C \"" << file << "\"");
477 }
478 else
479 {
480 if (IsBinaryFileType(IdentifyFile(file)))
481 {
482 m_logSources.AddBinaryFileReader(file);
483 }
484 else
485 {
486 m_logSources.AddDBLogReader(file);
487 }
488 }
489}
490
491void CMainFrame::OnDropFiles(HDROP hDropInfo)
492{

Callers

nothing calls this directly

Calls 8

SetTitleFunction · 0.85
StrClass · 0.85
IsBinaryFileTypeFunction · 0.85
IdentifyFileFunction · 0.85
AddProcessReaderMethod · 0.80
AddBinaryFileReaderMethod · 0.80
AddDBLogReaderMethod · 0.80
AddMessageMethod · 0.45

Tested by

no test coverage detected