当前位置:网站首页>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.
}
}
}
边栏推荐
- A tunnel to all ports of the server
- Golang's range
- 使用 FileChannel 进行文件的复制拷贝
- L'installateur a été installé avec une erreur inattendue
- WPF:解决MaterialDesign:DialogHost 无法关闭问题
- Install cross compiler arm none liunx gnueabihf
- tslib库的移植
- 超限黑客认知
- Maxcompute string splitting function -split_ PART
- 璞华PLM为全场景产品生命周期管理赋能,助力产品主线的企业数字化转型
猜你喜欢

jupyter远程服务器配置以及服务器开机自启

WPF:解决MaterialDesign:DialogHost 无法关闭问题
![[untitled]](/img/3d/27a7229e3f0ccf0ca5ae1f00a92513.jpg)
[untitled]

Haproxy+kept cluster setup 02

I want to do large screen data visualization application feature analysis

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

Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products

Unity change default editor

Haproxy+kept build 01

MAE
随机推荐
Abstract classes and interfaces
Wechat native applet cloud development learning record 01
P2704 [NOI2001] 炮兵阵地(状压dp)
C语言-入门-精华版-带你走进编程(一)
WPF:解决MaterialDesign:DialogHost 无法关闭问题
oracle中的 (+)是什么意思
Xlua task list youyou
Idea unreference Display Effect
What does (+) in Oracle mean
數據庫應用技術課程設計之商城管理系統
RM delete file
Base64 and base64url
Go resolve ID card
Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
MaxCompute字符串分割函数-SPLIT_PART
一条通往服务器所有端口的隧道
VMware virtual machine configuration static IP
Conversion between golang JSON format and structure
Base64和Base64URL
Lua framwrok framework starts