关于快捷方式的图标
CComPtr<IShellLink> slink;
slink.CoCreateInstance(CLSID_ShellLink));
CComPtr<IPersistFile> pFile;
slink.QueryInterface<IPersistFile>(&pFile);
pFile->Load(fname->AllocSysString(), STGM_READ));
slink->Resolve(hWnd, SLR_NOUPDATE);
CString str;
GameListItem Item;
slink->GetDescription(str.GetBuffer(MAX_PATH), MAX_PATH));
str.ReleaseBuffer();
strcpy(Item.Description, str);
slink->GetArguments(str.GetBuffer(MAX_PATH), MAX_PATH));
str.ReleaseBuffer();
strcpy(Item.Argument, str);
slink->GetPath(str.GetBuffer(MAX_PATH), MAX_PATH, NULL, SLGP_UNCPRIORITY))
str.ReleaseBuffer();
strcpy(Item.Path, str);
int index;
slink->GetIconLocation(str.GetBuffer(MAX_PATH), MAX_PATH, &index));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
在这里怎么也得不到图标的路径。前边的函数都正确
想尽所有的办法了,就是不行么!!!!!!
帮忙啊