Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liteav FreeLibrary异常 #16

Open
wcctml opened this issue Oct 23, 2023 · 0 comments
Open

liteav FreeLibrary异常 #16

wcctml opened this issue Oct 23, 2023 · 0 comments

Comments

@wcctml
Copy link

wcctml commented Oct 23, 2023

我的环境是 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant