dpnet: Use registry for lookup in IDirectPlay8Peer (try 2)

Bruno Jesus 00cpxxx at gmail.com
Fri Feb 14 03:30:30 CST 2014


On Fri, Feb 14, 2014 at 5:28 AM, Alistair Leslie-Hughes
<leslie_alistair at hotmail.com> wrote:
> Hi Bruno,
>
>
> On 14/02/2014 10:18 AM, Bruno Jesus wrote:
>>
>> On Thu, Feb 13, 2014 at 1:23 AM, Alistair Leslie-Hughes
>> <leslie_alistair at hotmail.com> wrote:
>> You are only reading the key value in the first loop to trace it,
>> maybe you could simplify this loop with a single RegGetValueW call and
>> no memory allocation just to get the size required and in the next
>> loop where you really copy the data you could trace it.
>
>
> Thanks for you feedback.  I've re-factored the patch and it's alot cleaner
> than the first few iterations.
>
> Its still needs to be a char cast since RegGetValueW returns the size in
> bytes which would make the offset incorrect.

Not really, because when you add a size to a pointer it increments in
the pointer size and not bytes. So WCHAR *ptr=0; ptr+=10;
printf("%p\n", p); would print 0x14 (20 in decimal although we just
added 10 to it).

> Best Regards
>  Alistair Leslie-Hughes

Bruno



More information about the wine-devel mailing list