On 30.04.2017 6:29, Alistair Leslie-Hughes wrote:
for (i = 0; i < cinput; i++)
{
memcpy(&types[2 * i], &input_types[i].guidMajorType, sizeof(GUID));
memcpy(&types[2 * i + 1], &input_types[i].guidSubtype, sizeof(GUID));
}
This probably could be simplified even more, you can use MFT_REGISTER_TYPE_INFO for 'types' (that would make it 'type' actually), and do types[i] = input_types[i];, or even copy whole input_types array at once. Same applies to MFTEnum().