当前位置:网站首页>UE4 call DLL
UE4 call DLL
2022-07-03 08:15:00 【The east wind blows the Willows】
[for UE 4.25.3]
UE4 call dll Methods and standards c And c++ identical , The core code is as follows :
// contain dll The header file
#include "C:/Users/Documents/Unreal Projects/MyProject01/MyPlugins/IGaussDiffusion.h"
#include "C:/Users/Documents/Unreal Projects/MyProject01/MyPlugins/IFactor.h"
// Definition dll Function pointers in
typedef void (* destroyGaussDiffusion)(IGaussDiffusion* );
typedef void (*destroyFactors)(IFactor*);
// call dll Code segment
FString filePath = FPaths::Combine(*FPaths::EnginePluginsDir(), TEXT("FangHua/"),
TEXT("GaussDiffusionDLL.dll")); // Concatenate the plugins folder and the DLL file.
if (FPaths::FileExists(filePath)) {
void* DLLHandle;
DLLHandle = FPlatformProcess::GetDllHandle(*filePath); // Retrieve the DLL.
if (DLLHandle != NULL) {
// Release Gauss
destroyGaussDiffusion DLLdestroyGaussDiffusion = NULL; // Local DLL function pointer.
FString procName = "freeGaussDiffusion"; // The exact name of the DLL function.
DLLdestroyGaussDiffusion = (destroyGaussDiffusion)FPlatformProcess::GetDllExport(DLLHandle, *procName); // Export the DLL function.
if (DLLdestroyGaussDiffusion != NULL) {
DLLdestroyGaussDiffusion(gaussDiffusion);// Call the DLL function, with arguments corresponding to the signature and return type of the function.
}
// Release Mie theory
destroyFactors DLLdestroyFactors = NULL; // Local DLL function pointer.
FString procName1 = "freeFactors"; // The exact name of the DLL function.
DLLdestroyFactors = (destroyFactors)FPlatformProcess::GetDllExport(DLLHandle, *procName1); // Export the DLL function.
if (DLLdestroyFactors != NULL) {
DLLdestroyFactors(factor);// Call the DLL function, with arguments corresponding to the signature and return type of the function.
}
}
}
边栏推荐
猜你喜欢

Free use until 2015 -- viz artist multi touch plug-in package

Unity2019_ Lighting system

Wechat applet taro learning record
![[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December](/img/51/81ceaf8746ec7455ea8abf9f038e81.jpg)
[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December

数据的存储

How to establish rectangular coordinate system in space

unity2019_ Input management

Lua framwrok framework starts
![[cocos creator] Click the button to switch the interface](/img/b8/f0fd54a2a197cbfd788990e2806b52.png)
[cocos creator] Click the button to switch the interface

oracle 插入单引号
随机推荐
【cocos creator】获取资源uuid
Initial unity
STM32F103 SPI (pit Diary)
[set theory] order relation (hastu example | divisive relation hastu | inclusive relation hastu | refinement relation hastu)
Golang json格式和结构体相互转换
haproxy+keepalived集群搭建02
【音视频】ijkplayer错误码
Uniapp learning records
Transplantation of tslib Library
方正锐利重磅升级到12.0版本,包装印前处理更加便捷、高效!
animation
Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products
go 解析身份证
【cocos creator】点击按钮切换界面
Conversion between JSON and object
What is a data type? What is the use of data types?
Viz artist advanced script video tutorial -- stringmap use and vertex operation
RM delete file
Lua framwrok framework starts
PIP uses image website to solve the problem of slow network speed