IID_IImageList and IID_IThumbnailProvider are not defined in libuuid:
#define STRICT_TYPED_ITEMIDS
#include <windows.h>
#include <commctrl.h>
#include <commoncontrols.h>
#include <shellapi.h>
#include <Shlobj.h>
#include <thumbcache.h>
int wmain()
{
IImageList* image_list = NULL;
if (SUCCEEDED(SHGetImageList(4, IID_IImageList, reinterpret_cast<void**>(&image_list))))
image_list->Release();
IShellFolder* folder = NULL;
if (SUCCEEDED(SHGetDesktopFolder(&folder)))
{
PIDLIST_RELATIVE pidl = NULL;
wchar_t path[] = L"C:\\";
if (SUCCEEDED(folder->ParseDisplayName(NULL, NULL, path, NULL, &pidl, NULL)))
{
IThumbnailProvider* provider = NULL;
if (SUCCEEDED(folder->GetUIObjectOf(NULL, 1, reinterpret_cast<PCUITEMID_CHILD_ARRAY>(&pidl),
IID_IThumbnailProvider, NULL, reinterpret_cast<void**>(&provider))))
provider->Release();
}
}
return 0;
}
g++ -mconsole -D_UNICODE -DUNICODE -municode -o test main.cpp -luuid
D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\temp\ccNWtRhg.o:main.cpp:(.rdata$.refptr.IID_IThumbnailProvider[.refptr.IID_IThumbnailProvider]+0x0):undefined reference to `IID_IThumbnailProvider'
D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\temp\ccNWtRhg.o:main.cpp:(.rdata$.refptr.IID_IImageList[.refptr.IID_IImageList]+0x0): undefined reference to `IID_IImageList'
mingw-w64 v14