当前位置:网站首页>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.
}
}
}
边栏推荐
- Minimap plug-in
- P1896 [SCOI2005] 互不侵犯(状压dp)
- Quelle est la définition? Qu'est - ce qu'une déclaration? Quelle est la différence?
- Generate video using clipout in viz engine
- 璞华PLM为全场景产品生命周期管理赋能,助力产品主线的企业数字化转型
- JS regular case-
- P1896 [scoi2005] non aggression (shape pressure DP)
- 数据分析练习题
- Golang 时间格式整理
- Uniapp learning records
猜你喜欢
Oracle queries grouped by time
Open the influence list of "National Meteorological Short Videos (Kwai, Tiktok) in November" in an interactive way“
一个实习生的CnosDB之旅
How to configure GDAL under idea
MXone Pro自适应2.0影视模板西瓜视频主题苹果cmsV10模板
the installer has encountered an unexpected error installing this package
Get to know unity2 for the first time
Editor Extensions
Wpf: solve the problem that materialdesign:dialoghost cannot be closed
[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December
随机推荐
Easy touch plug-in
What is a data type? What is the use of data types?
[usaco12mar]cows in a skyscraper g (state compression DP)
MaxCompute字符串分割函数-SPLIT_PART
Getting started with minicom
Dotween plug-in
freetype库的移植
Wechat applet taro learning record
Quelle est la définition? Qu'est - ce qu'une déclaration? Quelle est la différence?
Ilruntime learning - start from scratch
WPF:解决MaterialDesign:DialogHost 无法关闭问题
[cocos creator] Click the button to switch the interface
Golang time format sorting
Golang's range
VMware virtual machine configuration static IP
idea取消引用显示效果
Golang中删除字符串的最后一个字符
Chain length value
数据分析练习题
Three characteristics