当前位置:网站首页>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.
}
}
}
边栏推荐
- Conversion between golang JSON format and structure
- Are you still watching the weather forecast on TV?
- JSON与Object之间转换
- Product creation and commercial realization of chat robot (according to La Ma Bang - Dr. Wang Jingjing - speech)
- Install cross compiler arm none liunx gnueabihf
- An intern's journey to cnosdb
- Clip Related Script
- Use filechannel to copy files
- 一个实习生的CnosDB之旅
- P2622 light off problem II (state compression search)
猜你喜欢

数据的存储

oracle 插入单引号

Easy touch plug-in

Minimap plug-in

Ventuz Foundation Series "one step at the door"

Open the influence list of "National Meteorological Short Videos (Kwai, Tiktok) in November" in an interactive way“

十六进制编码简介

Haproxy+kept build 01

Transfinite hacker cognition

Are you still watching the weather forecast on TV?
随机推荐
swagger文档配置
P2622 light off problem II (state compression search)
Golang time format sorting
Conversion between string and int types in golang
Get to know unity2 for the first time
MXone Pro自适应2.0影视模板西瓜视频主题苹果cmsV10模板
一个实习生的CnosDB之旅
Go resolve ID card
idea取消引用顯示效果
YOLO系列 --- xml2txt脚本
Pulitzer Prize in the field of information graphics - malofiej Award
*p++、*++p、++*p、(*p)++
An intern's journey to cnosdb
What is a data type? What is the use of data types?
P2704 [noi2001] artillery position (shape pressure DP)
Pycharm remote ssh pyenv error: pydev debugger: warning: trying to add breakpoint to file that does
What does (+) in Oracle mean
STM32F103 SPI (pit Diary)
JS to implement publish and subscribe
Yolo series --- xml2txt script