I have been googling this and have not come along a working solution for an entire day. I don't know anything about binary data types (as I've never knowingly used them) and I'm trying to write a binary value that I see in the registry, to the registry. Now, all I see is the following [shown below]... and if I try to pass that as a string to the RegSetValueEx
in the WinAPI and of course it errors out... I do not know what 'numbers' I need to pass into the lpData As Any,
argument of RegSetValueEx
(i tried a bit array) in order for it to come out as the following [shown below] in the regedit. I really have no idea, and my tests to place random numbers in the bit array just produce corresponding random "figures" as visible in regedit that I do not understand how to 'tie' them together logically.
here is the culprit!
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Some\Registry\Location] "RegistryKey"=hex:01,00,00,00,d0,8c,9d,df,01,15,d1,11,8c,7a,00,c0,4f,c2,97,eb,\ 01,00,00,00,7b,96,8a,78,b9,cc,c1,4f,b1,35,11,01,5e,3c,25,9b,00,00,00,00,02,\ 00,00,00,00,00,10,66,00,00,00,01,00,00,20,00,00,00,22,1c,b6,ea,e3,a5,06,8b,\ 58,69,7b,89,19,b3,1f,a3,1d,d8,b7,5b,30,72,65,4b,22,41,a8,73,d1,92,bb,36,00,\ 00,00,00,0e,80,00,00,00,02,00,00,20,00,00,00,87,a0,1a,79,a7,c9,fe,7a,1b,24,\ 9a,71,5d,cf,7b,87,bc,1b,14,6e,59,96,e3,42,c6,f5,08,78,00,a6,42,3d,30,00,00,\ 00,02,0a,2a,ea,d9,49,0a,fa,48,b3,f1,e2,ae,e2,f8,42,a2,54,1e,56,dc,dd,9b,0d,\ 9b,73,41,72,54,cc,64,49,99,f1,5c,12,70,33,8e,fb,b1,31,66,df,b4,e0,02,bb,40,\ 00,00,00,13,c2,7d,88,16,af,56,ac,82,21,39,95,43,04,50,71,c2,4c,6a,44,a6,03,\ ea,32,4d,d9,f3,0f,22,2e,41,17,2e,26,11,9b,10,9d,99,60,fc,12,d2,ce,7c,1c,78,\ 6b,f0,59,23,fd,84,46,2c,58,41,ee,31,7a,f8,95,57,54
If I had the following in a string or a bit array, what must I populate the bitarray with so that the registry outputs this [above] when written? or, how can I figure out how to do it? I was hoping there'd be a function that reads my string of binary data and transforms it into the real binary format to submit to the RegSetValueEx function in VB6 or other function in VB.Net or C# (this really is a language agnostic question, and the problem exists in all languages; ie: same process).
I hope there is a solution to this or a lead that I can follow. Thanks guys, you are all the best when I've come to the point of pulling my hair out!