Recently Browsing 0 members
No registered users viewing this page.
Good morning Forums
In these days, I am working on a project that involved me to use some Windows APIs to obtain some information about Terminal Servers.
I'm doing this using wtsapi32.dll in a VBA Project, but, the lack of knowledge about few things threated in the articles make this quite difficult to
implement and understand at the same time.
The most difficult thing I'm facing is "translating" C/C++ functions or struct in VBA when pointers are used, or pointers of pointers, and so on.
Since VBA seems to not have a pointer type, to make those functions work I need to implement other functions taken from other DLLs, and this confuses me a lot.
For example, starting from this code, I splitted all the functions and all the definitions to understand why they are there, and why I need to use them.
At the end, I've found out that the code I was going to implement starting from the functions provided in the Microsoft Docs won't be ever be able to work without some supplementary functions which are not mentioned anywhere.
So, I was wondering if someone would please point me out to a good and practical exaplanation about pointers (in general) or specifically for VBA, because I need to use them quite often in these days, and I'd like to understand what I am doing.
Thanks in advance.
Best Regards and Stay at home 🏡
I got the Acroname Programmable USB Hub based on BrainStem platform. I will use it to manage ports and read current.
They have development kit (BRAINSTEM DEVELOPMENT KIT) with examples for any languages like C#, C++, LabVIEW and python but no AutoIt.
The kit include BrainStem2.dll (x32 and x64), BrainStem2_LabVIEW.dll, BrainStem2CLI.dll and many examples.
Anyone used this dll and implemented it in AutoIt?
Please share some example for Device Discovering, User LED Flashing or power enable/disable on port to start play with this HUB
BrainStem2 lib+example.7z USB HUB User Manual s79-usbhub-3p_v1.10_0.pdf
A pretty simple UDF to convert HTML to PDF using wkHTMLtoPDF.
It uses the C API of the tool (DLL), so no external process, no ActiveX or COM sh*t.
See the example, and the documentation of wkHTMLtoPDF.
This is relevant
From here https://stackoverflow.com/questions/3454315/is-it-possible-to-pin-a-dll-in-memory-to-prevent-unloading
I use several UDFs on the Forum to do various things. Those UDFs work very well.
Effectively the UDFs are DLL wrappers, that make it possible to access DLL functions easily without the long hard slog of DLLCall() every time.
However, I have now run into the issue that multiple UDF DLLCalls are slow. Not mind numbingly slow, but slow enough to become noticeable with a large of repeated function calls.
So I was wondering, is it possible to "load a DLL into memory" and leave it there for the duration of my script's lifetime, avoid repeated DLL on-disk reads with a persistent in memory DLL?
Looks like what I want to do is: load-time dynamic linking,
So next question, (a) how do I do this with AutoIt (b) How would this impact on standard AutoIt type DLL calls?
The point is speed. Is there a different approach?
Or am I barking up the wrong tree?