hossa everyone ,
i want to show in my program if df? autodial is enabled or not.

for this i need help to create following function:
is binary regkey set to 00h 00h 00h 01h = autodial on

normal its set to 00h 00h 00h 00h = autodial off

to read the binary key i use this:
call RegOpenKeyExA,80000001h,offset AutoDial,0,1,offset OPTION_Handle
cmp eax,ERROR_SUCCESS
jnz NO_ADIAL
call RegQueryValueExA,OPTION_Handle,offset AutoDialVal1,0,3,offset Buffer,4
call RegCloseKey,OPTION_Handle

first i think if autodial is off then the result is 0 ,because 00h 00h 00h 00h is nothing ,i mean ,so i try to use cmp eax,0....but wont work.

so what must i now do to see if the value is 00h 00h 00h 00h or 00h 00h 00h 01h ?

Thanks !
Posted on 2002-02-28 06:30:28 by Max
max ive never tried to query a hex value from the registry yet. but shouldnt this line:

cmp eax, 0

be

cmp eax, 0h

this way your not comparing a decimal value but instead a hex value.
Posted on 2002-02-28 09:28:23 by smurf

max ive never tried to query a hex value from the registry yet. but shouldnt this line:

cmp eax, 0

be

cmp eax, 0h

this way your not comparing a decimal value but instead a hex value.


that doesnt matter smurf, 0 decimal and 0 hex are the same :)

To Max:
you should compare the buffer after the regqueryvalue
Posted on 2002-02-28 10:49:11 by savage
Max,

last parameter of RegQueryValueEx is a pointer to a dword, not a dword itself. And it should be filled with size of buffer before the invoke. And parameter 4, the "type" of the value, is a pointer to a dword too (which will be filled after the call or should be NULL)

japheth
Posted on 2002-02-28 10:54:47 by japheth
smurf:
0 is 0 for any number systems (any radix)
as last digit is the same for any number system
'cause it means
radix^0 * digit = 1*digit = digit
Posted on 2002-02-28 11:05:16 by The Svin