Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

liteav FreeLibrary异常

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start with the reported Visual Studio 2022 environment using the v141_xp toolset and the liteav.dll loading sequence in the issue. Inspect the calls to getTRTCShareInstance, destroyTRTCShareInstance, and FreeLibrary, then review LiteAV_C_20231023-24100.zip for supporting logs. Done means reproducing the exception and documenting its cause and a verified resolution.

Written by the indexing model from the issue text.

Description

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

Dominant language
C#
Stars
26
Forks
19
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tencent-RTC/TRTC_Windows

All issues in Tencent-RTC/TRTC_Windows

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.