请选择 进入手机版 | 继续访问电脑版

郁金香灬老师 游戏安全  驱动 逆向调试 C/C++编程  脚本 UE4/UE5

找回密码
立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
发新帖
课程大纲和价格
官方联系方式2024在线课大纲QQ咨询

34万

积分

131

好友

145

主题
发表于 2024-8-13 14:59:00 | 查看: 1192| 回复: 2


关键代码:WindowsPlatformMisc.cpp中PureCallHandler这个函数
HoloLensMisc.cpp中也包含了PureCallHandler这个静态函数



extern CORE_API bool GEdSelectionLock;
extern CORE_API bool GIsClient;
extern CORE_API bool GIsServer;
extern CORE_API bool GIsCriticalError;
extern CORE_API TSAN_ATOMIC(bool) GIsRunning;
extern CORE_API bool GIsDuplicatingClassForReinstancing;



                if( GIsRunning )
                {
                        FMessageDialog::Open( EAppMsgType::Ok, NSLOCTEXT("Core", "PureVirtualFunctionCalledWhileRunningApp", "Pure virtual function being called while application was running (GIsRunning == 1).") );
                }



static void PureCallHandler()
{
        static bool bHasAlreadyBeenCalled = false;
        UE_DEBUG_BREAK();
        if (bHasAlreadyBeenCalled)
        {
                // Call system handler if we're double faulting.
                if (DefaultPureCallHandler)
                {
                        DefaultPureCallHandler();
                }
        }
        else
        {
                bHasAlreadyBeenCalled = true;
                if (GIsRunning)
                {
                        FMessageDialog::Open(EAppMsgType::Ok, NSLOCTEXT("Core", "PureVirtualFunctionCalledWhileRunningApp", "Pure virtual function being called while application was running (GIsRunning == 1)."));
                }
                UE_LOG(LogTemp, Fatal, TEXT("Pure virtual function being called"));
        }
}


static void PureCallHandler()
{
        static bool bHasAlreadyBeenCalled = false;
        UE_DEBUG_BREAK();
        if( bHasAlreadyBeenCalled )
        {
                // Call system handler if we're double faulting.
                if( DefaultPureCallHandler )
                {
                        DefaultPureCallHandler();
                }
        }
        else
        {
                bHasAlreadyBeenCalled = true;
                if( GIsRunning )
                {
                        FMessageDialog::Open( EAppMsgType::Ok, NSLOCTEXT("Core", "PureVirtualFunctionCalledWhileRunningApp", "Pure virtual function being called while application was running (GIsRunning == 1).") );
                }
                UE_LOG(LogWindows, Fatal,TEXT("Pure virtual function being called") );
        }
}

游戏安全课程 学员办理咨询联系QQ150330575 手机 139 9636 2600  免费课程 在 www.bilibili.com 搜 郁金香灬老师
发表于 2024-8-13 14:59:47
CoreGlobals.h 这个头文件里 有定义

extern CORE_API bool GEdSelectionLock;
extern CORE_API bool GIsClient;
extern CORE_API bool GIsServer;
extern CORE_API bool GIsCriticalError;
extern CORE_API TSAN_ATOMIC(bool) GIsRunning;
extern CORE_API bool GIsDuplicatingClassForReinstancing;

回复 显示全部楼层 道具 举报

发表于 2024-8-13 15:02:38
Core.h 里也有说明
extern CORE_API TSAN_ATOMIC(bool) GIsRunning;

具体定义在 CoreGlobals.cpp中
TSAN_ATOMIC(bool)                GIsRunning(false);       

回复 显示全部楼层 道具 举报

您需要登录后才可以回帖 登录 | 立即注册

QQ咨询

QQ|Archiver|手机版|小黑屋|郁金香游戏技术

GMT+8, 2024-12-9 10:56 , Processed in 0.083320 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表