Home » Community » Coffee corner » Load dll with U++
Re: Load dll with U++ [message #56702 is a reply to message #56700] |
Sun, 04 April 2021 00:00   |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi Novo Thanks,
but
for a beginner, it is difficult to understand at first a reference to in-depth routines such as "DL"!
this topic of your link does not clarify much.
See after searching the forum, I also didn't get any practical example. So, only about 2 links commented on the "DL", then I made a comparison with some examples of Dll´s p / c ++ from the tutorialspoint, and even then, I hit my head, but in the end I got it wrong and tried it. I thank my guardian angel too!!!
..
//didn't have this component so I had to look for how to download...ide->menu Setup->UppHub and select Functions4U
//in the declaration
#include <Functions4U/Functions4U.h>
...
Dl screen;
void (*yF)(int x, int y, int cx, int cy, char *filename);
...
//AA is my class with method below
// integer n is saves lives
//lifeguards that I had to adapt because
//the link https://www.ultimatepp.org/src$Functions4U$Dl$en-us.html
//that exemplifies on windows will fail (bug?) if it [b]loads repeatedly[/b]
void AA::clickDll(){
if(n==0){
if (!screen.Load(AppendFileName("C:\\Temp\\outU++\\NOVOXXX\\CLANGx64.Debug.Debug_Full.Gui", "CaptureScreenDll.dll")))
throw Exc(Format(t_("% dll not found"), "Capture"));
yF = (void (*)(int,int,int,int,char *))screen.GetFunction("capture_screen");
}
if (!yF)
throw Exc(Format(t_("Function %s does not found in dll"), "captureScreen"));
char* f="teste.png";
yF(669,187,420,22,f);
n++;
}
|
|
|
Goto Forum:
Current Time: Tue Aug 12 22:03:04 CEST 2025
Total time taken to generate the page: 0.07364 seconds
|