当前位置:网站首页>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.
}
}
}
边栏推荐
- 【cocos creator】获取资源uuid
- Wechat applet taro learning record
- 【K&R】中文第二版 个人题解 Chapter1
- P2704 [NOI2001] 炮兵阵地(状压dp)
- Chain length value
- Golang string segmentation, substitution and interception
- P2622 light off problem II (state compression search)
- The general trend of data news releases the power of visual reporting ----- essays after reading
- Clip Related Script
- CLion-Toolchains are not configured Configure Disable profile问题解决
猜你喜欢

*p++、*++p、++*p、(*p)++

haproxy+keepalived搭建01

Flex flexible box layout

Scite change background color

How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03

the installer has encountered an unexpected error installing this package

A tunnel to all ports of the server

Viz artist advanced script video tutorial -- stringmap use and vertex operation

Unity2019_ Natural ambient light_ Sky box

C language - Introduction - essence Edition - take you into programming (I)
随机推荐
P2704 [noi2001] artillery position (shape pressure DP)
the installer has encountered an unexpected error installing this package
STM32F103 SPI (pit Diary)
JS regular case-
Editor Extensions
MXone Pro自适应2.0影视模板西瓜视频主题苹果cmsV10模板
Youyou1 of xlua knapsack system
Golang的range
Transplantation of tslib Library
Are you still watching the weather forecast on TV?
oracle 插入单引号
一条通往服务器所有端口的隧道
animation
Maxcompute string splitting function -split_ PART
JS to implement publish and subscribe
Golang's range
E: Unable to locate package ROS melody desktop full
Conversion between string and int types in golang
VMware virtual machine configuration static IP
JS common basic case sorting (continuous update)