"James Hawkins" truiken@gmail.com writes:
- ret = MsiSourceListGetInfoW(product, usersid, dwContext, dwOptions,
property, value, pcchValue);
- if (ret == ERROR_SUCCESS)
WideCharToMultiByte(CP_ACP, 0, value, -1, szValue, *pcchValue, NULL, NULL);
The handling of pcchValue is wrong, you need a separate variable for the W size, and you need to set *pcchValue to the correct A size.