adamgal Posted April 24, 2005 Share Posted April 24, 2005 first of all I have to say it's a really great addition and I found it very useful, the only problem I have is that the _DllMemGet() function is really slow (takes like 3ms) which is a big problem since it's basically a function that reads out of a variable and I have to call it all the time. so if you can fix it that would be great or if you have another solution I'd love to hear it. thanks anyway for a great program Link to comment Share on other sites More sharing options...
adamgal Posted April 24, 2005 Author Share Posted April 24, 2005 I timed the program and it turns out the slowdown is in _DllMemElementOffset() so what I thought is you could have _DllMemGet() work with an array of premade offsets instead of the struct string. that's actually what I did in my script to speed things up but I just thought it would be a good idea to change your package since it's really unfeasable to have a read taking 3ms. Link to comment Share on other sites More sharing options...
Ejoc Posted April 24, 2005 Share Posted April 24, 2005 I didn't time it, but I'm not surprised. One way I was toying with changing _DllMem was to have it return an array not just the pointer to the memory. Then that array might contain: $array[0] = ptr $array[1] = "struct passed to it" $array[2] = struct size $array[3] = # elements $array[4]..[n] = offsets $array[$n+1]..[x] = element sizes This would change the way the _DllMemGet and Set functions get called, and it would change the way you make DllCall("","","","ptr",$array[0]) But chaniging it this way would make _DllMemGet pretty fast as it wouldnt need to do much calculating. Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Ejoc Posted April 24, 2005 Share Posted April 24, 2005 (edited) Hmm actually, I'd like to make a change like I mentioned in my last post, but I would like to hopefully tie it too a beta version of autoit. What I think I'll do is change my DLL functions slightly, and then hopefully they can get integrated into the beta, and then the DLL wont be required. So I guess I'll: 1) Change my DLL code 2) Try to get AutoIt to compile on my machine using MinGW, which it sounds like it can 3) Transform the current _DllMem* UDFs into somthing new maybe _C_Struct* 4) Add the array information to the new functions to improve executing times This would in effect Kill _DllMem and Halt any development on it Got AutoIt to compile finally Edited April 24, 2005 by Ejoc Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now