DebugViewPP
DebugViewPP copied to clipboard
OutputDebugString output showing in SI DbgView not showing in Debugview++
OS: Windows 7 64-bit Application: 64-bit Windows Explorer thumbnail + preview plugin
Different result are observed on apparently identical systems.
- on one PC Windows 7/x64, we do get the thumbnail-plugin outputdebug in debugview+
- on another Windows 7/x64,we get no output from both
- on both workstations, dbgview catches all messages
I have tested a 64-bit hello world application, that worked fine, so it is more then just the 64-bit application
Rene: Thuis zie ik wel weer de debug messages in Dbgview en niet in DebugView++. Zie attachment voor de settings ('Capture Global Win32' heb ik net uitgezet want dat bleek niet nodig). Alle processen draaien onder mijn account (met Admin rechten).
Appearently, for Windows Vista and later a filter mask can be specified
https://msdn.microsoft.com/en-us/library/windows/hardware/ff551519%28v=vs.85%29.aspx#setting_the_component_filter_mask
Tried:
{
// open the mutex that we're going to adjust
HANDLE hMutex = OpenMutex(MUTEX_ALL_ACCESS, FALSE, L"DBWinMutex");
// create SECURITY_DESCRIPTOR with an explicit, empty DACL
// that allows full access to everybody
SECURITY_DESCRIPTOR sd;
InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(
&sd, // addr of SD
TRUE, // TRUE=DACL present
NULL, // ... but it's empty (wide open)
FALSE); // DACL explicitly set, not defaulted
// plug in the new DACL
SetKernelObjectSecurity(hMutex, DACL_SECURITY_INFORMATION, &sd);
}
Source: http://www.unixwiz.net/techtips/outputdebugstring.html Result: no effect
Tried: http://www.unixwiz.net/tools/dbmutex.html Result: no effect
Tried:
- re-compiling debugview++ in x64 mode
- running debugview as administrator
- running explorer.exe as administrator
- both result: no effect
Tried:
SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sa;
Handle DBWinReader::CreateDBWinBufferMapping(bool global)
{
// not doing anything...
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = false;
sa.lpSecurityDescriptor = &sd;
// Initialize the security descriptor.
if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION))
throw std::runtime_error("InitializeSecurityDescriptor");
// Set information in a discretionary access control list
if (!SetSecurityDescriptorDacl(&sd, TRUE, 0, FALSE))
throw std::runtime_error("SetSecurityDescriptorDacl");
Handle hMap(CreateFileMapping(nullptr, &sa, PAGE_READWRITE, 0, sizeof(DbWinBuffer), GetDBWinName(global, L"DBWIN_BUFFER").c_str()));
//Handle hMap(CreateFileMapping(nullptr, nullptr, PAGE_READWRITE, 0, sizeof(DbWinBuffer), GetDBWinName(global, L"DBWIN_BUFFER").c_str()));
if (GetLastError() == ERROR_ALREADY_EXISTS)
throw std::runtime_error("CreateDBWinBufferMapping");
return hMap;
}
Result: no effect
According to this post, we need a kernel hook to capture global session 0 messages. http://stackoverflow.com/questions/5055015/issue-capturing-global-session-0-outputdebugstring-messages-via-win32-api
Maybe http://www.codeproject.com/Articles/2082/API-hooking-revealed can help us
Tested:
- http://www.hootech.com/WinTail/
- http://www.codeproject.com/kb/winsdk/outputdebugstring.aspx
- https://code.google.com/p/buggazer/
- http://www.codeproject.com/Articles/13345/DbMon-NET-A-simple-NET-OutputDebugString-capturer (DbMon.net)
result: all have the same problem
Conclusion: the problem seems to be specific to the application (64-bit plugin for explorer.exe). Apparently it is not using the 'normal' OutputDebugString mechanism.
Closing the issue as 'out of scope', like kernel messages, SI dbgview can be used for these cases.
Might be solved by 424dd4318685aea5d8a9084a2724dc59ff38561b retest