Jump to content
wraithdu

Custom Registry Functions UDF

Recommended Posts

I've also found out this script is incompatible with the built-in APIRegConstants.au3.

Since it has been over 2 years, I hope it's okay to post a new update.

If anyone cares to test and confirm it, I'll eventually remove the commented out lines:

Update 1/6/14:

v2.1.0

- Commented out most of the $HKEY_.... and instead included the built-in APIRegConstants.au3

- Commented out $REG_QWORD since it's already declared in an included script (the built-in constants.au3)

_RegFunc.au3

Edited by LWC

Share this post


Link to post
Share on other sites

I still use this UDF a lot. I did find an issue.. not with the script per say. 

Anyways I thought I would share in case anyone is using this.

a registry value was returning 0 when there was data. Apparently the registry key was created incorrectly (it was not null-terminated)

The DllCall from line 83 was returning an odd number in ret[6]

this was causing DllStructCreate in line 122 to fail, so the data return was 0.

To fix this I added under line 93:

If Mod($iLen, 2) = 1 Then  $iLen += 1 

This allow the DllStructCreate to run and the data was return correctly.

Share this post


Link to post
Share on other sites

Sorry for late posting, but I can't quite tell what this UDF is supposed to do or help with.  I was hoping it would universalize registry reads, enums, writes, and deletes such that I wouldn't have to worry about 32-bit vs 64-bit registry entries, but it didn't appear to do that.

Is the UDF supposed to do that and I'm using it wrong? If not, what does it help with?  I read through the code to the best of my ability and, although it does check for 32 vs 64-bit OS on occasion, I couldn't figure out what it does with that, or what its benefits might be in general.

 

Share this post


Link to post
Share on other sites
On 4/16/2018 at 6:09 PM, Mbee said:

Sorry for late posting, but I can't quite tell what this UDF is supposed to do or help with.  I was hoping it would universalize registry reads, enums, writes, and deletes such that I wouldn't have to worry about 32-bit vs 64-bit registry entries, but it didn't appear to do that.

Is the UDF supposed to do that and I'm using it wrong? If not, what does it help with?  I read through the code to the best of my ability and, although it does check for 32 vs 64-bit OS on occasion, I couldn't figure out what it does with that, or what its benefits might be in general.

 

Nevermind, I'm developing a universalized UDF for 32/64-bit registry access that works correctly, but I want to ensure there are no bugs and otherwise clean up the code before posting it...  If anyone wants to know more, either respond here or PM me...

 

Share this post


Link to post
Share on other sites

You got it, argumentum!

I've already got everything working, which means that one can call any one of my four UReg functions (matching the four built-in functions) without knowing if it's a 32 or 64-bit type of key in advance.  But I've got more thinking to do about efficiency with regard to  ByRef variables (which the style guide discourages).

I've some other things to complete, too, but I expect that everything will be ready by the end of this week or early next week.

Thanks for expressing an interest!

Share this post


Link to post
Share on other sites

Sir @argumentum, would you be willing to beta test the pre-release version of the UDF I devised?

What I have now seems to work correctly in my testing, but --- (1): The option to perform the same operation on both the 32- and 64-bit modes hasn't been coded yet, and (2): Everyone needs others' eyes to see if I've got a bug or whatnot.

Let me know...

Share this post


Link to post
Share on other sites
3 hours ago, Mbee said:

would you be willing to beta test

Sure. I'll test it out, if you write the "test.au3". I'll run it on every OS version I have in VMware. I can not give it a hole lot of time but I can run a test here and there and if I see something that I feel is obvious, I'll tell you :) 

Share this post


Link to post
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

×
×
  • Create New...