mirror of
https://github.com/reactos/reactos.git
synced 2025-06-17 14:15:33 +00:00
[SDK][SHELL32] Augment the internally used IDataObject with some extra formats
This is needed because our code seems to use CF_HDROP a lot, instead of HIDA...
This commit is contained in:
parent
f9d3c2c608
commit
c31327114b
10 changed files with 58 additions and 15 deletions
|
@ -378,6 +378,28 @@ HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, T4
|
|||
return hResult;
|
||||
}
|
||||
|
||||
template<class T, class T1, class T2, class T3, class T4, class T5>
|
||||
HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, T4 initArg4, T5 initArg5, REFIID riid, void ** ppv)
|
||||
{
|
||||
_CComObject<T> *pobj;
|
||||
HRESULT hResult;
|
||||
|
||||
hResult = _CComObject<T>::CreateInstance(&pobj);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
|
||||
pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
|
||||
|
||||
hResult = pobj->Initialize(initArg1, initArg2, initArg3, initArg4, initArg5);
|
||||
|
||||
if (SUCCEEDED(hResult))
|
||||
hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
|
||||
|
||||
pobj->Release(); /* In case of failure the object will be released */
|
||||
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HRESULT inline SHSetStrRet(LPSTRRET pStrRet, LPCSTR pstrValue)
|
||||
{
|
||||
pStrRet->uType = STRRET_CSTR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue