当前位置:网站首页>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.
}
}
}
边栏推荐
- STM32F103 SPI (pit Diary)
- Product creation and commercial realization of chat robot (according to La Ma Bang - Dr. Wang Jingjing - speech)
- Lua hot update basic grammar
- Lua framwrok framework starts
- Minimap plug-in
- Three characteristics
- Are you still watching the weather forecast on TV?
- Idea dereference display effect
- Go resolve ID card
- Docker installs MySQL and successfully uses Navicat connection
猜你喜欢
Scite change background color
Install cross compiler arm none liunx gnueabihf
My touch screen production "brief history" 1
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
Easy touch plug-in
Haproxy+kept build 01
About Wireshark's unsuccessful installation of npcap
VMware virtual machine configuration static IP
MAE
數據庫應用技術課程設計之商城管理系統
随机推荐
RM delete file
Golang url的编码和解码
One dimensional array two dimensional array (sort Max insert sort)
STM32F103 SPI (pit Diary)
Are you still watching the weather forecast on TV?
I want to do large screen data visualization application feature analysis
【cocos creator】获取资源uuid
2021-10-19
Base64 and base64url
String class
Retail philosophy retail psychological warfare after reading -- 7-11 is a good product!
About the problem that the editor and the white screen of the login interface cannot be found after the location of unityhub is changed
Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products
[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December
E: Unable to locate package ROS melody desktop full
什麼是定義?什麼是聲明?它們有何區別?
Transfinite hacker cognition
[cocos creator] Click the button to switch the interface
Base64和Base64URL
超限黑客认知