LPMALLOC pMalloc = NULL; SHGetMalloc(&pMalloc); if (pMalloc) { pMalloc->Free(pidl); pMalloc->Release(); }Can be replaced with just:
CoTaskMemFree(pidl);This is simpler and less error prone.
LPMALLOC pMalloc = NULL; SHGetMalloc(&pMalloc); if (pMalloc) { pMalloc->Free(pidl); pMalloc->Release(); }Can be replaced with just:
CoTaskMemFree(pidl);This is simpler and less error prone.