Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

New Post: Application can't redirect printing messages to file.

$
0
0
I wrote an application include vld.h by VS2012, and I found the IO redirection does not work in win7 32-bit or 64-bit OS (XP won't have this problem). (ex. "test.exe > test.log", test.log is empty if test.exe is debug build, with vld)
So I searched code by IsWin7OrBetter(), and found if I mark
m_patchTable[0].exportModuleName = "kernelbase.dll";
in
    else
    {
        assert(m_patchTable[0].patchTable == m_kernelbasePatch);
        //m_patchTable[0].exportModuleName = "kernelbase.dll";
        if (kernelBase)
            m_original_GetProcAddress = (_GetProcAddressType *) GetProcAddress(kernelBase,"GetProcAddress");
    }
The IO redirection works again.

Is there any difference between patching kernelbase.dll and kernel32.dll?
And does that mean GetProcAddress will be patched by using kernel32.dll, or GetProcAddress won't be patched?
Thanks!

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>