-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
There's one major problem I missed previously:
Am 2015-05-29 um 10:22 schrieb Alistair Leslie-Hughes:
case DPNA_DATATYPE_STRING:
memcpy(pvBuffer, &entry->data.string, entry->size);
break;
This won't work. There's a & too much.
Please consider adding tests for String and Binary types to catch this kind of thing. GetComponentByName once had the same problem I believe.
Minor stuff:
- TRACE("(%p)->(%d %p %p %p %p %p)\n", This, dwComponentID, pwszName, pdwNameLen, pvBuffer, pdwBufferSize, pdwDataType);
pdwNameLen, pvBuffer, pdwBufferSize, pdwDataType); A DWORD is unsigned, %u is better.
- if(*pdwBufferSize < entry->size || *pdwNameLen < namesize)
- {
*pdwNameLen = namesize + 1;
*pdwBufferSize = entry->size;
*pdwDataType = entry->type;
return DPNERR_BUFFERTOOSMALL;
- }
You forgot to add a WARN here.