-----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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJVaCrwAAoJEN0/YqbEcdMwypEP/RttOLSqc6fQQW4XeMkBgVaS
aiKUyYSysq9MnRoqP32A6lKq9LHpW23liKsvpwoWegdarTc35ENYwG7pLSLJuOIy
i/e7AlWGLDphN9qdYMU0oCQ8PXGU8Y3Mb7kozZcnYm9EuYoJEFIiAYHtx4nFeGMj
rVx/mruLmYTdgyR378iE4cYqNeMwzK7YtGNRHMPz8FNTzdLyzUu1blYQ8cYEbzAk
Mm4RaIixByzKiGO7qUPCX4OOgYoohBOgMRiVWTJfZLrhKY0vyj0x2Jt5GWCzWeht
7mszNRRpvW+v60axT2xwemXmQSobjgjnddF0bwxC/vHZisfXF8H52lLgupXv9KRo
efOsvX3lTpJstEL1Wt61NL/MqF4vwRjbrWeKD45DxHEzPX8wzUg4yFodz/yxAAN1
/l4fuX8BEjr9tttV4uup4fdOlVhlX95ZujQFT5Ue1zF97SSLOC9id/8Uy8xlHYmY
Ou0H9GG5rILqG5+r9m3OghjuQcwomL6T7BSLYJ+WncdTgtxRbarhMI/mq9m0MiB2
OHkUddm/zn9EFPboQsCjqRuPFa6fcbx+b/XUmyLeBjosO3j7Otws4TGUEkzjbvWF
f3fOORfbxpknZH9GxVaEFWlyUerNSJ4C4hYp5J+pHS9N5u+L9KsN0fXYT9jqpvh2
Tmu94XyHSblAoeS1ORgq
=M5Sz
-----END PGP SIGNATURE-----