Cannot convert argument from 'LPITEMIDLIST *' to 'LPCITEMIDLIST *'
See the question and my original answer on StackOverflowYes, samples from Microsoft sometimes need to be adapted to modern headers from modern SDKs. Usually, the more recent SDK (from Visual Studio or not) you use, the stricter the compilation is.
You can just change rgpidlChildren declaration to (note the 'C', for const):
PCITEMID_CHILD rgpidlChildren[c_cMaxFilesToCreate] = { 0 };