/****************************************************************************** * ItemMonikerIROTData_GetComparisonData ******************************************************************************/ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, ULONG cbMax, ULONG* pcbData) { ItemMonikerImpl *This = impl_from_IROTData(iface); int len = (strlenW(This->itemName)+1); int i; LPWSTR pszItemName; LPWSTR pszItemDelimiter; TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData); *pcbData = sizeof(CLSID) + sizeof(WCHAR) + len * sizeof(WCHAR); if (cbMax < *pcbData) return E_OUTOFMEMORY; /* write CLSID */ memcpy(pbData, &CLSID_ItemMoniker, sizeof(CLSID)); /* write delimiter */ pszItemDelimiter = (LPWSTR)(pbData+sizeof(CLSID)); *pszItemDelimiter = *This->itemDelimiter; /* write name */ pszItemName = pszItemDelimiter + 1; for (i = 0; i < len; i++) pszItemName[i] = toupperW(This->itemName[i]); return S_OK; }
/*********************************************************************** * ClassMonikerIROTData_Release */ static ULONG WINAPI ClassMonikerROTData_Release(IROTData* iface) { ClassMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); return ClassMoniker_Release(&This->IMoniker_iface); }
/*********************************************************************** * ClassMonikerIROTData_AddRef */ static ULONG WINAPI ClassMonikerROTData_AddRef(IROTData *iface) { IMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); return ClassMoniker_AddRef(This); }
/*********************************************************************** * ItemMonikerIROTData_Release */ static ULONG WINAPI ItemMonikerROTDataImpl_Release(IROTData* iface) { ItemMonikerImpl *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); return ItemMonikerImpl_Release(&This->IMoniker_iface); }
/*********************************************************************** * AntiMonikerIROTData_AddRef */ static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface) { AntiMonikerImpl *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); return AntiMonikerImpl_AddRef(&This->IMoniker_iface); }
/*********************************************************************** * AntiMonikerIROTData_Release */ static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface) { IMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); return AntiMonikerImpl_Release(This); }
/******************************************************************************* * ClassMonikerIROTData_QueryInterface *******************************************************************************/ static HRESULT WINAPI ClassMonikerROTData_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) { ClassMoniker *This = impl_from_IROTData(iface); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); return ClassMoniker_QueryInterface(&This->IMoniker_iface, riid, ppvObject); }
/*********************************************************************** * FileMonikerIROTData_AddRef */ static ULONG WINAPI FileMonikerROTDataImpl_AddRef(IROTData *iface) { FileMonikerImpl *This = impl_from_IROTData(iface); TRACE("(%p)\n",This); return IMoniker_AddRef(&This->IMoniker_iface); }
/******************************************************************************* * AntiMonikerIROTData_QueryInterface *******************************************************************************/ static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) { IMoniker *This = impl_from_IROTData(iface); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); return AntiMonikerImpl_QueryInterface(This, riid, ppvObject); }
/******************************************************************************* * FileMonikerIROTData_QueryInterface */ static HRESULT WINAPI FileMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) { FileMonikerImpl *This = impl_from_IROTData(iface); TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppvObject); return FileMonikerImpl_QueryInterface(&This->IMoniker_iface, riid, ppvObject); }
/******************************************************************************* * ItemMonikerIROTData_QueryInterface *******************************************************************************/ static HRESULT WINAPI ItemMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid, void **ppvObject) { ItemMonikerImpl *This = impl_from_IROTData(iface); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); return ItemMonikerImpl_QueryInterface(&This->IMoniker_iface, riid, ppvObject); }
/****************************************************************************** * ClassMonikerIROTData_GetComparisonData ******************************************************************************/ static HRESULT WINAPI ClassMonikerROTData_GetComparisonData(IROTData* iface, BYTE* pbData, ULONG cbMax, ULONG* pcbData) { ClassMoniker *This = impl_from_IROTData(iface); TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData); *pcbData = 2*sizeof(CLSID); if (cbMax < *pcbData) return E_OUTOFMEMORY; /* write CLSID of the moniker */ memcpy(pbData, &CLSID_ClassMoniker, sizeof(CLSID)); /* write CLSID the moniker represents */ memcpy(pbData+sizeof(CLSID), &This->clsid, sizeof(CLSID)); return S_OK; }
/****************************************************************************** * FileMonikerIROTData_GetComparisonData */ static HRESULT WINAPI FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, ULONG cbMax, ULONG* pcbData) { FileMonikerImpl *This = impl_from_IROTData(iface); int len = strlenW(This->filePathName)+1; int i; LPWSTR pszFileName; TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData); *pcbData = sizeof(CLSID) + len * sizeof(WCHAR); if (cbMax < *pcbData) return E_OUTOFMEMORY; memcpy(pbData, &CLSID_FileMoniker, sizeof(CLSID)); pszFileName = (LPWSTR)(pbData+sizeof(CLSID)); for (i = 0; i < len; i++) pszFileName[i] = toupperW(This->filePathName[i]); return S_OK; }