winapi - Why SHCreateItemFromIDList faild? -
tchar temp[max_path] = { 0, }; hresult hr = null; pidlist_absolute pidl; //=lpitemidlist ishellitem2 *_psidrop=null; hresult hr = coinitializeex(null, coinit_apartmentthreaded | coinit_disable_ole1dde); //must add this! shparsedisplayname(l"c:\\", null, &pidl, 0, null); if (shgetpathfromidlist(pidl, temp)) { wprintf(l"%s\n", temp); } hr = shcreateitemfromidlist(pidl, iid_ppv_args(&_psidrop)); if (failed(hr)) { wprintf(l"shcreateitemfromidlist failed"); }
how can initialize ishellitem2 use pidlist_absolute ? _psidrop has been null.
Comments
Post a Comment