首页 > 其他 > 详细

(UE4) 动态加载DLL

时间:2015-04-04 18:12:29      阅读:1682      评论:0      收藏:0      [点我收藏+]

目前还没有实现,实在搞不懂为什么,大概代码如下:

技术分享
//--------------------------------------------------------------------------------------
    FString filePath = FPaths::Combine(*FPaths::GameDir(), TEXT("MFCDLL/"),TEXT("OpenFile.dll"));
    typedef FCString(WINAPI *getPath)(void);
    FCString str;
    if (FPaths::FileExists(filePath))
    {
        void *DLLHandle;
        DLLHandle = FPlatformProcess::GetDllHandle(*filePath); // Retrieve the DLL.
        if (DLLHandle != NULL)
        {
            getPath getFilePath=NULL;
            FString procName = "getFilePath";
            getFilePath=(getPath)FPlatformProcess::GetDllExport(DLLHandle, *procName);
            str=getFilePath();
        }
    }
    //-----------------------------------------------------------------------------
View Code

 

(UE4) 动态加载DLL

原文:http://www.cnblogs.com/tengpan-cn/p/4392436.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!