Jump to content

DllStructEx - Extended DllStruct for AutoIt3


genius257
 Share

Recommended Posts

Getting an error when executing Example.au3:

123
321
DllStructEx\Example.au3" (55) : ==> The requested action with this object has failed.:
$tKEY_EVENT_RECORD = DllStructExGetStruct($txINPUT_RECORD.Event.KeyEvent)
$tKEY_EVENT_RECORD = DllStructExGetStruct($txINPUT_RECORD.Event^ ERROR

 

Interesting approach.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

36 minutes ago, UEZ said:

Getting an error when executing Example.au3

Hi @UEZ :)

Sorry it was a mistake on my part, not running my example code before release 😖

It should be fixed in version 1.0.1

Link to comment
Share on other sites

Version 1.1.0 released!

Most important change is a fix to the byte padding, that previously made DllStructEx useless with unions and nested structs with external calls! 🎊

Edited by genius257
Link to comment
Share on other sites

Hey all :)

So I'm working on this project again, trying to get it more stable, for use in some more complicated projects i am working on.

I don't know how many are using this project or to what degree, but i would love some feedback for features or issues.

 

Currently i am doing a rewrite for the parsing of struct strings, moving away from regular expressions and using a more hand made implementation.

I am mostly done making my new parser compatible with the old one, currently only missing handling of "STRUCT;", "ENDSTRUCT;" and "ALIGN n;", since the old code handled that internally in a less than desirable way.

After that i am also adding array support, since i am neck deep in the new parser anyways :D

Link to comment
Share on other sites

13 hours ago, argumentum said:

Every 1.1.0 points to 1.0.1

Thanks for the heads up :D

I can understand how the top post link may have been wrong, but i don't get how i messed up with the 1.1.0 announcement post 🤔

I have updated the links for now ;)

13 hours ago, argumentum said:

Using "https://github.com/genius257/DllStructEx/releases/latest"  will point to the latest version

Might update the top posts to do this for the next release version ;)

Link to comment
Share on other sites

v2.0.0 is now available.

The parser is now a hand written solution, instead of using regex
This fixes multiple issues, most notable crash with exit code c0000005, while trying to parse a variant tag.

Array support has also been added, this is what has taken the most time 😅.

NOTE: DllStructEx is no longer contained in a single file. I plan on using my package script solution later to generate and attach a bundled version to every release automatically, but my dung beetle project is still not ready for use.

Also little fun info: Every push and pull request for this project repository now triggers unit tests via GitHub actions, to help me no to push failing code by accident :D

Link to comment
Share on other sites

8 hours ago, argumentum said:
#include "../au3pm/au3unit/Unit/assert.au3"
"D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\tests\arrayTest.au3"(6,24) : error: assertEquals(): undefined function.

:(

Oh no worries that is annoying but intentional 😅.

the au3pm folder is the folder for my package manager au3pm. the au3pm.json (or au3pm-lock.json if available) file in a repository specifies the dependencies and the manager will resolve and download them to that folder. Every dependency except AutoIt will currently resolve to a commit hash or release on GitHub, so you could manually download the release and add it to that folder if you wanted :)

You can see the steps my GitHub action script does, to make this work here: https://github.com/genius257/DllStructEx/blob/main/.github/workflows/test.yml#L26-L31
I've created a re-usable GitHub action that downlods the au3pm binary and then simple just runs the command(s) here: https://github.com/au3pm/au3pm-action/blob/main/action.yml

Thread for the package manager:

 

Edited by genius257
Link to comment
Share on other sites

5 hours ago, genius257 said:

Oh no worries that is annoying but intentional 😅.

the au3pm folder is the folder for my package manager au3pm. the au3pm.json ... , so you could manually download the release and add it to that folder if you wanted :)

I did but no cigar. assertEquals() is not there. My expertise, in my many, many years of running scripts ( I'd say, am a legend ), is to load them and press F5.
Other than that I feel quite useless. So I get the zip with the scripts and, ... :wacko2:

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

6 hours ago, argumentum said:

I did but no cigar. assertEquals() is not there. My expertise, in my many, many years of running scripts ( I'd say, am a legend ), is to load them and press F5.
Other than that I feel quite useless. So I get the zip with the scripts and, ... :wacko2:

Ah, i apologize. what i meant was to download the release for each of the dependencies, and their dependencies (basically manually resolving the dependency tree).
But there is more steps for manually solving the dependencies. Since each dependency needs a linked folder to the parent folder (au3pm).

The dependencies are currently not needed to run the main code, only the tests.

If you wish to do it manually, you need the following steps:

  • Add a new folder in the project, with the name "au3pm"
  • download au3unit_v1.0.0, StringRegExpSplit_v1.0.0 and autoit_v3.3.16.1
  • extract each zip file to the au3pm folder
  • rename the extracted "install" folder to "autoit"
  • rename the extracted "au3unit-1.0.0" folder to "au3unit"
  • rename the extracted "StringRegExpSplit-1.0.0" folder to "StringRegExpSplit"
  • open up cmd.exe
    • create a directory junction for au3unit with: mklink /J "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm\au3unit\au3pm\" "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm"
    • create a directory junction for StringRegExpSplit with: mklink /J "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm\StringRegExpSplit\au3pm\" "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm"
  • the unit tests should now work

With the package manager it is:

  • Download au3pm_v0.3.1 executable or build the exe manually
  • open cmd.exe
    • move working directory to the project via: cd /D "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\"
    • install dependencies with: "D:\Users\Tester\Downloads\au3pm.exe" install
  • the unit tests should now work

 


Sadly i cannot upload a zip of my au3pm folder, as it is 31,7 MB in size and the directory junctions prevent archiving tools from working.

Edited by genius257
Added link to executable
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...