Alistair Leslie-Hughes leslie_alistair@hotmail.com writes:
- hr = IDirectPlay8Address_GetURLW(iface, buffer, length);
- if(hr == DPN_OK)
- {
DWORD size;
size = WideCharToMultiByte(CP_ACP, 0, buffer, -1, NULL, 0, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, buffer, -1, url, size, NULL, NULL);
This doesn't make sense. The size should be the initial size of the output buffer passed by the app, and it should be updated to the actual output size, with a check for overflows.