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

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Fri Feb 14 03:53:41 CST 2014


Hi Bruno,

On 14/02/2014 8:30 PM, Bruno Jesus wrote:
> On Fri, Feb 14, 2014 at 5:28 AM, Alistair Leslie-Hughes
> 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).
The theory is correct.  However RegGetValueW returns the size of the 
buffer we would need to allocate including the null terminator. In your 
example it would return 20 (9+1*sizeof(WCHAR)) and not 10.


Best Regards
  Alistair Leslie-Hughes



More information about the wine-devel mailing list