Louis Lenders xerox_xerox2000@yahoo.co.uk writes:
- info = HeapAlloc(GetProcessHeap(), 0, req_size);
- info->pwszName = (LPWSTR)(info + 1);
- if(!pguidServiceProvider)
- {
lstrcpyW(info->pwszName, dp_providerW);
info->guid = CLSID_DP8SP_TCPIP;
- }
- else
- {
lstrcpyW(info->pwszName, dp_adapterW);
info->guid = adapter_guid;
- }
- *pSPInfoBuffer = *info;
- *pcReturned = 1;
- HeapFree(GetProcessHeap(), 0, info);
This doesn't make sense, you are returning freed data.