Simon Mourier's Avatar
Simon Mourier's blog (1807 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI3, AOT, P/Invoke, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • c/c++
  • winapi
  • windows-shell

Cannot convert argument from 'LPITEMIDLIST *' to 'LPCITEMIDLIST *'

Dec 1, 2018 See the question and my original answer on StackOverflow

Yes, 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 };
  • SmoBlog © 2010-2026 Simon Mourier. All rights reserved.
  • Privacy & Terms