breakpoint at LoadLibrary with output :Exception thrown

142 Views Asked by At
#include <windows.h>
int main(int argc, char* argv[])
{
    HINSTANCE hinstLib = ::LoadLibrary(TEXT("VSPerf170.dll"));
    if (hinstLib != NULL)
    {
        BOOL fFreeResult = ::FreeLibrary(hinstLib);
    }

    return 0;
}

when I Start Debug, break point at LoadLibrary with output : Exception thrown at 0x76B8E292 in test.exe: Microsoft C++ exception: xSharedMemoryException at memory location 0x00EFF330.

windows 10, visual studio 2022 17.6.2

please help~

VSPerf170.dll is a component of visual studio 2022, which can be useful for performance analysis.

I'm sorry for the question is unclear. it is a simple win32 application name "test" build with visual studio community 2022(the least version). there is just one file test.cpp with these codes above.

when I start debug, it stop on the first line.

here is the debug output:

'test.exe' (Win32): Loaded 'D:\program\test.exe'. Symbols loaded.
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. 
The thread 0x438c has exited with code 0 (0x0).
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\VSPerf170.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. 
'test.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. 
Exception thrown at 0x76B8E292 in test.exe: Microsoft C++ exception: xSharedMemoryException at memory location 0x00EFF3C8.

here is the callstack:

KernelBase.dll!76b8e292()
[Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]
VSPerf170.dll!7b8295c2()
VSPerf170.dll!7b825c8c()
VSPerf170.dll!7b826357()
VSPerf170.dll!7b825a95()
VSPerf170.dll!7b81bf07()
VSPerf170.dll!7b81c06d()
VSPerf170.dll!7b82851a()
VSPerf170.dll!7b8285fc()
ntdll.dll!77aa2ab6()
ntdll.dll!77a7de02()
ntdll.dll!77a81903()
ntdll.dll!77a81a71()
ntdll.dll!77a82315()
ntdll.dll!77a7e332()
ntdll.dll!77a7df76()
KernelBase.dll!76b735b6()
KernelBase.dll!76b7411a()
KernelBase.dll!76b740d2()
ucrtbased.dll!7b712c02()
ucrtbased.dll!7b70fa93()
ucrtbased.dll!7b712c02()
ucrtbased.dll!7b6d042e()
kernel32.dll!768800f9()
ntdll.dll!77a97bbe()
ntdll.dll!77a97b8e()
0

There are 0 best solutions below