I'm new to JNA but it seems like it should do exactly what I need but I'm having some trouble.
I'm trying to set overlay icons on my applications task bar icon using the Windows ITaskbarList3::SetOverlayIcon method. The problem is when I try and call this from my JNA java code, I get told the method doesn't exist. I think this is because the method I'm calling is defined inside an INTERFACE in the C header file so I can't refer to it directly. I think this is a COM thing. JNA claims support for that but I haven't been able to figure out how to get it working or any example code. Can anyone help?
Here's the header file definition of the method I'm trying to call (from shobjidl.h):
#define INTERFACE ITaskbarList3
DECLARE_INTERFACE_(ITaskbarList3, ITaskbarList2)
{
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(HrInit)(THIS) PURE;
STDMETHOD(AddTab)(THIS_ HWND) PURE;
STDMETHOD(DeleteTab)(THIS_ HWND) PURE;
STDMETHOD(ActivateTab)(THIS_ HWND) PURE;
STDMETHOD(SetActiveAlt)(THIS_ HWND) PURE;
STDMETHOD(MarkFullscreenWindow)(THIS_ HWND,BOOL) PURE;
STDMETHOD(SetProgressValue)(THIS_ ULONGLONG,ULONGLONG) PURE;
STDMETHOD(SetProgressState)(THIS_ HWND,TBPFLAG) PURE;
STDMETHOD(RegisterTab)(THIS_ HWND,HWND) PURE;
STDMETHOD(UnregisterTab)(THIS_ HWND) PURE;
STDMETHOD(SetTabOrder)(THIS_ HWND,HWND) PURE;
STDMETHOD(SetTabActive)(THIS_ HWND,HWND,DWORD) PURE;
STDMETHOD(ThumbBarAddButtons)(THIS_ HWND,UINT,LPTHUMBBUTTON) PURE;
STDMETHOD(ThumbBarUpdateButtons)(THIS_ HWND,UINT,LPTHUMBBUTTON) PURE;
STDMETHOD(ThumbBarSetImageList)(THIS_ HWND,HIMAGELIST) PURE;
STDMETHOD(SetOverlayIcon)(THIS_ HWND,HICON,LPCWSTR) PURE;
STDMETHOD(SetThumbnailTooltip)(THIS_ HWND,LPCWSTR) PURE;
STDMETHOD(SetThumbnailClip)(THIS_ HWND,RECT*) PURE;
};
#undef INTERFACE
typedef ITaskbarList3 *LPTASKBARLIST3;