I'm trying now to finish of my registry program.
The bug in it is that I'm not reading binary registry values incorrectly, however I've found the external function that does it, It's called GetBinaryValue.
Now I've got it wrong somewhere as I am getting an unresolved external error on compile.
Attached is the small program, It's not meant to do anything yet, just use the above function.
Even for me, I thought I'd be able to work this one out for myself - help please!
Here is a link to msdn about it:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa390440%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
Here is the output window message:
Compiling Resources...
No Errors
Compiling...
r1.iwb
Linking...
IWBasic Linker v1.11 Copyright © 2011 Ionic Wind Software
Unresolved external __imp_GetBinaryValue
Error: C:\Win10\r1.o - Unresolved extern __imp_GetBinaryValue
Error(s) in linking C:\Win10\r1.exe
To test:
I created a registry key called "1" and a binary value in there called "test"
(HKEY_CURRENT_USER\Software\1)
Help please!
Thanks,
Andy.
You're trying to use the wrong function; that one is out of the WMI dll
you want to use the api32.dll which you used with your registry inc file back in 2011.
but you will have a name conflict
in your inc file you have a RegGetValue subroutine for getting string values from registry
but that is a windows api function name to get any type of value including binary
same thing with RegSetValue
Look here
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724868(v=vs.85).aspx
Thanks Larry,
I will look into it.
Andy.
:)
Well, It is interesting when you look back at some of your older Code.
I have worked out now how to get binary values correctly using the RegGetValue in my registry.inc file.
The function I was trying to use did give me a big clue, binary values need to be read in as UINTs and I worked out what changes I needed to make, now I can finish the binary section off and have a go at Multi strings and expandable strings.
I will post the code when I have finished it.
:)
Have you already worked out the fact that binaries can be any length and not just the length of a single UINT?
Larry,
Yes I have, and It's working well, also I have now worked out how to write binary values back to the registry, so I'm well and truely on it now, thanks.
This is now a working registry binary editor.
I can read / write / edit binary registry values.
I will add in the ability to add / delete lines as well - the screenshot is of the stand alone program which will be added into my registry viewer / editor as soon as I'm finished.
P.S. Graham - must find some time to look at your recent offerings!
Attached is the screenshot of what I have got so far, I made a new registry key and binary value to test, so this is what It's displaying in this test program.
I am using my StringMap library as it now has all the registry functions added into it including loading and unloading registry keys.
I would (as always) welcome any thoughts or suggestions!
Andy.