当前位置: 首页>>代码示例>>C++>>正文


C++ StringList::HasValue方法代码示例

本文整理汇总了C++中StringList::HasValue方法的典型用法代码示例。如果您正苦于以下问题:C++ StringList::HasValue方法的具体用法?C++ StringList::HasValue怎么用?C++ StringList::HasValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StringList的用法示例。


在下文中一共展示了StringList::HasValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IsWebrootLoaded

BOOL IsWebrootLoaded()
{
    BOOL ret = FALSE;
    StringList moduleList;

    OSGetLoadedModuleList (GetCurrentProcess(), moduleList);

    HMODULE msIMG = GetModuleHandle(TEXT("MSIMG32"));
    if (msIMG)
    {
        FARPROC alphaBlend = GetProcAddress(msIMG, "AlphaBlend");
        if (alphaBlend)
        {
            if (!IsBadReadPtr(alphaBlend, 5))
            {
                BYTE opCode = *(BYTE *)alphaBlend;

                if (opCode == 0xE9)
                {
                    if (moduleList.HasValue(TEXT("wrusr.dll")))
                        ret = TRUE;
                }
            }
        }
    }

    return ret;
}
开发者ID:SeargeDP,项目名称:OBS,代码行数:28,代码来源:OBS.cpp

示例2: OSCheckForBuggyDLLs

//This function checks for DLLs that are known to cause problems, but we need to be more specific than a generic "incompatible modules"
//message. As we expect these to change often, I'm not bothering with localization. These DLLs are generally buggy drivers, malware, etc
VOID STDCALL OSCheckForBuggyDLLs ()
{
    StringList  moduleList;

    if (!OSGetLoadedModuleList(GetCurrentProcess(), moduleList))
        return;

    if (moduleList.HasValue(TEXT("sendori.dll")))
    {
        Log(TEXT("BUGGY DLL DETECTED: sendori.dll"));
        MessageBox (hwndMainAppWindow, TEXT("Your system appears to be infected with the Sendori malware, which can crash OBS and cause other problems. Please run a malware scan."), TEXT("Warning"), MB_ICONEXCLAMATION);
    }

    if (moduleList.HasValue(TEXT("qproxy.dll")))
    {
        Log(TEXT("BUGGY DLL DETECTED: qproxy.dll"));
        MessageBox (hwndMainAppWindow, TEXT("Your system has an unknown LSP module installed which can cause OBS crashes / lag and other problems. Please remove qproxy.dll using a tool such as autoruns, or reset your TCP/IP settings (search KB299357 for more information)."), TEXT("Warning"), MB_ICONEXCLAMATION);
    }

    //FIXME: add a version check for bigfoot networks LSP (bfllr.dll), crashes OBS on old versions.
}
开发者ID:Eridia,项目名称:OBS,代码行数:23,代码来源:XT_Windows.cpp

示例3: OSIncompatiblePatchesLoaded

BOOL   STDCALL OSIncompatiblePatchesLoaded(String &errors)
{
    BOOL ret = FALSE;
    StringList moduleList;

    OSGetLoadedModuleList (GetCurrentProcess(), moduleList);

    //known problematic code modification hooks can be checked for here

    //current checks:
    //TeamSpeak 3 Overlay (hooks CreateDXGIFactory1 in such a way that it fails when called by OBS)
    //Webroot Secureanywhere (hooks GDI calls and prevents OBS from screen capturing among other issues)

    HMODULE dxGI = GetModuleHandle(TEXT("DXGI.DLL"));
    if (dxGI)
    {
        FARPROC createFactory = GetProcAddress(dxGI, "CreateDXGIFactory1");
        if (createFactory)
        {
            if (!IsBadReadPtr(createFactory, 5))
            {
                BYTE opCode = *(BYTE *)createFactory;

                if (opCode == 0xE9)
                {
                    if (moduleList.HasValue(TEXT("ts3overlay_hook_win32.dll")) ||
                        moduleList.HasValue(TEXT("ts3overlay_hook_win64.dll")))
                    {
                        errors << TEXT("TeamSpeak 3 overlay has loaded into OBS and will cause problems. Please set \"Disable Loading\" for OBS.EXE in your TeamSpeak 3 overlay settings or visit http://bit.ly/OBSTS3 for help."); 
                        ret = TRUE;
                    }
                }
            }
        }
    }

    //I'm just going to make this a warning that pops up when the app starts instead of actually preventing people from using the app
    //People are complaining about this a bit too much and it's just like "whatever, do whatever you want"
    /*HMODULE msIMG = GetModuleHandle(TEXT("MSIMG32"));
    if (msIMG)
    {
        FARPROC alphaBlend = GetProcAddress(msIMG, "AlphaBlend");
        if (alphaBlend)
        {
            if (!IsBadReadPtr(alphaBlend, 5))
            {
                BYTE opCode = *(BYTE *)alphaBlend;

                if (opCode == 0xE9)
                {
                    if (moduleList.HasValue(TEXT("wrusr.dll")))
                    {
                        if (!errors.IsEmpty())
                            errors << TEXT("\r\n\r\n");

                        errors << TEXT("Webroot Secureanywhere appears to be active. This product is incompatible with OBS as the security features block OBS from accessing Windows GDI functions. Please add OBS.exe to the Secureanywhere exceptions list and restart OBS - see http://bit.ly/OBSWR if you need help."); 
                        ret = TRUE;
                    }
                }
            }
        }
    }*/

    return ret;
}
开发者ID:tks2103,项目名称:OBS,代码行数:65,代码来源:XT_Windows.cpp


注:本文中的StringList::HasValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。