Re: [Registry] change
Brought to you by:
aviram
|
From: Jens A. <ra...@sk...> - 2004-10-18 20:10:27
|
----- Original Message ----- From: "Markus Raab" <mai...@gm...> To: <reg...@li...> Sent: Monday, October 18, 2004 9:39 PM Subject: Re: [Registry] change <snip> >> When it's read back in and unencode is called the data passed there is >> simply 190 (and seemingly some garbage data as well). This could possibly >> be the problem? > > Can you post me the code how to read it to get any value back? I just added printf's in various parts of the the kdb library code ;) The purpose was mainly to find out if the actual reading or if it was the encoding function that messed things up. (In the end I found that it seems to be encoding/saving the data that is the problem. The resulting data contains weird symbols and stuff) >> Tbh, i'm not sure if you can even just convert it back and set it the way >> the code does? (from further investigation it seems you can't..It gives >> some really weird results) > > Maybe best will be to cut off the encoding for binary values. It does not > make > sense anyway and does not work. Or can you repair that avi? I agree. It's quite likely to work better if we completely cutoff encoding the data. Just simply fwrite it after writing the DATA signature stuff... And then when reading simply use fread to get it back :) (i.e. actually read till EOF and not just till end of string) the actual conversion code has some problems atm, in particular casting to unsigned char...with ints that means it goes quite bad and ends up with a weird value when used. Basically it's going to be hard to get it working for all types while still encoding it...(unless you fwrite it to memory first, then encode the resulting data and then go on from there...? Not sure if that would work at all...Seems easier to just not encode ;)) Regards, Jens Andersen |