Hello, why is information about reading registry keys so hard to find ? is it so easy ? all i know is how to read/write a string reg key,like... ------ call RegOpenKeyEx,80000002h,offset atgOpen,1, 1, offset handle call RegQueryValueExA, handle, offset atgKey1, 0, 0, offset FName, offset Vdatsize call RegCloseKey,handle ------- how can i >read< binary reg keys ? thanks
Posted on 2001-03-11 15:22:00 by WH¥
Hello, no one who like to help me ? hm,this question is for a security tool to protect your firewalls. all is ready....the gui and some other functions.....what i need to finish it ,is the function to see if the firewalls are enabled or not. i code the weekend on this and most time i search the web for an answer to my question :( so i need to know how to read a binary reg key ,how to set one is more danger i think than reading :) my problem is that im not shure where to insert the REG_BINARY and how i translate the result. when i try it ,i got another result than the reg key has. like the key is 01 and i get | so i think the problem is the translation of the result. thanks and cu
Posted on 2001-03-12 02:14:00 by WH¥
Reading a binary key is just like reading any other data from the registry, how you interpret that data is another matter entirely. The fourth Parameter is they type of data you want to read. Umbongo
Posted on 2001-03-12 04:23:00 by umbongo
Hello thanks for trying to help me :) so the question has to be: how to convert a binary to a string ? if i write here a 3 (for binary)i got nothing ??? | \|/ call RegQueryValueExA, handle, offset atgKey1, 0, 0, offset FName, offset Vdatsize if i use this with a 0 ,i got some results. i got nothing if the key has 00 and | if key is 01 or any other value then 00. so i try is: cmp eax,0 (for nothing if the key has 00 as value) je notenabled (if =0 then soft is disabled) ... ... i try it with cmp eax," " ,0 ,00h ,"" noting work. for me its hard to use my brain on something i have not enough background info. so this must sound weierd to you all :) more then searching the web,asking and using try and error i cant do ,i think. so i would happy if some one can show ,or better explain ,how i get the right result. thanks
Posted on 2001-03-12 06:58:00 by WH¥
hm, ok - you want to retrieve a value from an existing reg-key. but what value-type is this??? in my example i used the first byte but if that is wrong you can use the fourth api parameter (like umbongo said) to get the right value... .data? result db 256 dup (?) .code ;... call RegQueryValueExA,hdl,addr Key,NULL,NULL,addr result,sizeof result or byte ptr result[0],0 jz @notinstalled . . . @notinstalled
Posted on 2001-03-12 07:27:00 by drcmda
Hi, thanks for the help. now i got it working :) the reg key is binary ,so i have to change the 0 (for sting) to 3(reg_binary),now i understand :) next i use lstren...... i think i have to buy a good book and read more tutorials(who are hard to read by my english knowledge) thanks for help :)
Posted on 2001-03-12 07:46:00 by WH¥
just keep posting here and bothering us. I will keep an eye out for your posts and try to help if I can :)
Posted on 2001-03-12 08:49:00 by umbongo