Originally posted by DarKcyde
Seems you've decided to go with a static library. Guess I'll be the first to request a DLL again.
I've implemented a working ViGEm solution in Thrustmaster TARGET script (for TM joysticks). It uses an interpreted C syntax, but it's not compiled, nor a full C implementation. Crucially, it does have Loadlibrary() which allowed me to use ViGEmUM.dll just fine. Because it's not compiled, I have no way to link a .lib to the script.
I would think that other script based languages would have an easier time loading a DLL. In particular I'm thinking of Autohotkey. I know it has very good DLL loading abilities, but I don't know if it could use a static library.
About the API, the limited C syntax I'm stuck with doesn't have the ability to pass a struct as a parameter to a function. I can pass the address of a struct though, so pointer params are just fine. I had to modify the gamepad update function in the DLL to take pointers only. The new API seems to have changed nearly all params to pointers, except the vigem_target_x360_update() requires a XUSB_REPORT struct still. If that was a pointer, I wouldn't have to fiddle with anything.
I've seen a working winsock (dll) implementation using Target script, and that used pointers wherever a struct was passed. Perhaps pointers are standard practice for passing structs to DLLs? I dunno, I'm a hobbyist coder at best... way beyond my pay grade.