Hi,
I've implemented IShellFolder and IExtractIcon. In IShellFolder I have the following code
Code:
STDMETHODIMP CILCShellFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *rgfReserved, void **ppv){
ATLTRACE(_T("CILCShellFolder::GetUIObjectOf\n"));
HRESULT hr;
//if(riid == IID_IExtractIcon){
if(IsEqualIID(riid, IID_IExtractIcon)){
CComObject<CILCExtractIcon>* extractIcon;
hr = CComObject<CILCExtractIcon>::CreateInstance ( &extractIcon );
extractIcon->AddRef();
//extractIcon->Init((IShellFolder*)this);
extractIcon->QueryInterface( IID_IExtractIcon, (void**)ppv);
extractIcon->Release();
return hr;
}
return E_NOTIMPL;;
}
The problem is that my IExtractIcon implementation is never called because the riid of GetUIObjectOf always is IID_IExtractIconA. I thought that IID_IExtractIcon is set depending you have a Unicode or ANSI dll. Everything is set to Unicode for the project. So as long as I do not check for IID_IExtractIconA it's not working. What's the problem?
Kind regards,
Michael