From 37badded3a4a07fc042e4ffefa48cb1d0575c845 Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Fri, 22 May 2026 14:09:21 +0800 Subject: [PATCH 1/3] ShellExt: Add debug printing --- Source/WindowsShellExtension/dllmain.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/WindowsShellExtension/dllmain.cpp b/Source/WindowsShellExtension/dllmain.cpp index 53e07725f..ef5e918ec 100644 --- a/Source/WindowsShellExtension/dllmain.cpp +++ b/Source/WindowsShellExtension/dllmain.cpp @@ -16,6 +16,13 @@ #define SHELLEXT_GUID "20669675-b281-4c4f-94fb-cb6fd3995545" #endif // MEDIAINFO_QT +//#define MEDIAINFO_DEBUG // Uncomment to view debug printing using https://learn.microsoft.com/en-us/sysinternals/downloads/debugview +#ifdef MEDIAINFO_DEBUG + #define DebugPrintW(...) OutputDebugStringW(wil::str_printf(L##__VA_ARGS__).c_str()) +#else + #define DebugPrintW(...) +#endif // MEDIAINFO_DEBUG + constexpr const wchar_t* menu_entry_title = L"MediaInfo"; constexpr const wchar_t* exe_filename = L"MediaInfo.exe"; @@ -456,6 +463,8 @@ struct ExplorerCommandHandler : public winrt::implements