TRTC_Windows icon indicating copy to clipboard operation
TRTC_Windows copied to clipboard

liteav FreeLibrary异常

Open wcctml opened this issue 2 years ago • 0 comments

我的环境是 Visual Studio 2022, 工具集是Visual Studio 2017 - Windows XP (v141_xp)

liteav 11.1.0.4523 ::FreeLibrary(m_hModule); 报异常,如图

` typedef ITRTCCloud* (__cdecl* GetTRTCShareInstance)(); typedef void(__cdecl* DestroyTRTCShareInstance)();

HMODULE m_hModule(nullptr);
GetTRTCShareInstance getTRTCShareInstance(nullptr);
DestroyTRTCShareInstance destroyTRTCShareInstance(nullptr);
ITRTCCloud* m_pCloud(nullptr);
std::wstring wstrDLLPath = _T("liteav.dll");
m_hModule = ::LoadLibraryEx(wstrDLLPath.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
if (m_hModule)
{
    getTRTCShareInstance = (GetTRTCShareInstance)::GetProcAddress(m_hModule, "getTRTCShareInstance");
    destroyTRTCShareInstance = (DestroyTRTCShareInstance)::GetProcAddress(m_hModule, "destroyTRTCShareInstance");
    m_pCloud = getTRTCShareInstance();
    if (m_pCloud)
    {
        std::string strVersion = m_pCloud->getSDKVersion();
    }
}
if (getTRTCShareInstance || m_pCloud)
{
    destroyTRTCShareInstance();
    m_pCloud = nullptr;
    getTRTCShareInstance = nullptr;
    destroyTRTCShareInstance = nullptr;
}
if (m_hModule)
{
    ::FreeLibrary(m_hModule);
}

`

image

日志文件 LiteAV_C_20231023-24100.zip

wcctml avatar Oct 23 '23 05:10 wcctml