Esempio n. 1
0
static HRESULT WINAPI DataObjectImpl_SetData(IDataObject* iface, FORMATETC *pformatetc,
                                             STGMEDIUM *pmedium, BOOL fRelease)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    FIXME("(%p): stub\n", This);
    return E_NOTIMPL;
}
Esempio n. 2
0
static ULONG WINAPI DataObjectImpl_AddRef(IDataObject* iface)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    ULONG ref = InterlockedIncrement(&This->ref);
    TRACE("(%p) ref=%d\n", This, ref);
    return ref;
}
Esempio n. 3
0
VOID DESK_EXT_CALLBACK
CDevSettings_SetPruningMode(PVOID Context,
                            BOOL PruningOn)
{
    HKEY hKey;
    DWORD dwValue;
    PCDevSettings This = impl_from_IDataObject((IDataObject *)Context);

    DPRINT1("CDevSettings::SetPruningMode(%d)\n", PruningOn);

    if (This->bModesPruned && !This->bKeyIsReadOnly &&
        PruningOn != This->bPruningOn)
    {
        This->bPruningOn = (PruningOn != FALSE);

        hKey = pCDevSettings_OpenDeviceKey(This,
                                           FALSE);
        if (hKey != NULL)
        {
            dwValue = (DWORD)This->bPruningOn;

            RegSetValueEx(hKey,
                          TEXT("PruningMode"),
                          0,
                          REG_DWORD,
                          (const BYTE *)&dwValue,
                          sizeof(dwValue));

            RegCloseKey(hKey);
        }
    }
}
Esempio n. 4
0
File: link.c Progetto: GYGit/reactos
static HRESULT WINAPI IDataObject_fnQueryInterface(IDataObject* iface,
        REFIID riid, LPVOID *ppvObj)
{
    HlinkImpl *This = impl_from_IDataObject(iface);
    TRACE("%p\n", This);
    return IHlink_QueryInterface(&This->IHlink_iface, riid, ppvObj);
}
Esempio n. 5
0
static HRESULT WINAPI DataObjectImpl_DAdvise(IDataObject* iface, FORMATETC *pformatetc, DWORD advf,
                                             IAdviseSink *pAdvSink, DWORD *pdwConnection)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    FIXME("(%p): stub\n", This);
    return E_NOTIMPL;
}
Esempio n. 6
0
static ULONG STDMETHODCALLTYPE
CDevSettings_Release(IDataObject* iface)
{
    ULONG refs;
    PCDevSettings This = impl_from_IDataObject(iface);
    refs = (ULONG)InterlockedDecrement((PLONG)&This->ref);
    if (refs == 0)
        pCDevSettings_Free(This);

    return refs;
}
Esempio n. 7
0
static ULONG WINAPI IDataObjectImpl_Release(IDataObject * iface)
{
    IDataObjectImpl *This = impl_from_IDataObject(iface);
    ULONG ref = InterlockedDecrement(&This->ref);

    if (!ref)
    {
        HeapFree(GetProcessHeap(), 0, This);
        return 0;
    }
    return ref;
}
Esempio n. 8
0
static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, FORMATETC *pformatetcIn,
                                                           FORMATETC *pformatetcOut)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    TRACE("(%p)->(%p,%p)\n", This, pformatetcIn, pformatetcOut);

    if(pformatetcOut) {
        *pformatetcOut = *pformatetcIn;
        pformatetcOut->ptd = NULL;
    }
    return DATA_S_SAMEFORMATETC;
}
Esempio n. 9
0
static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID riid, LPVOID *ppvObj)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    TRACE("(%p)->(%s)\n", This, debugstr_guid(riid));

    if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) {
        IDataObject_AddRef(iface);
        *ppvObj = This;
        return S_OK;
    }
    *ppvObj = NULL;
    return E_NOINTERFACE;
}
Esempio n. 10
0
static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwDirection,
                                                   IEnumFORMATETC **ppenumFormatEtc)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    TRACE("(%p)->(%d)\n", This, dwDirection);

    if(dwDirection != DATADIR_GET) {
        FIXME("Unsupported direction: %d\n", dwDirection);
        /* WinXP riched20 also returns E_NOTIMPL in this case */
        *ppenumFormatEtc = NULL;
        return E_NOTIMPL;
    }
    return EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenumFormatEtc);
}
Esempio n. 11
0
VOID DESK_EXT_CALLBACK
CDevSettings_GetPruningMode(PVOID Context,
                            PBOOL pbModesPruned,
                            PBOOL pbKeyIsReadOnly,
                            PBOOL pbPruningOn)
{
    PCDevSettings This = impl_from_IDataObject((IDataObject *)Context);

    DPRINT1("CDevSettings::GetPruningMode(%p,%p,%p)\n", pbModesPruned, pbKeyIsReadOnly, pbPruningOn);

    *pbModesPruned = This->bModesPruned;
    *pbKeyIsReadOnly = This->bKeyIsReadOnly;
    *pbPruningOn = This->bPruningOn;
}
Esempio n. 12
0
static HRESULT STDMETHODCALLTYPE
CDevSettings_QueryGetData(IDataObject* iface,
                          FORMATETC* pformatetc)
{
#if DEBUG
    TCHAR szFormatName[255];
#endif
    PCDevSettings This = impl_from_IDataObject(iface);

    if (pformatetc->dwAspect != DVASPECT_CONTENT)
        return DV_E_DVASPECT;

    if (pformatetc->lindex != -1)
        return DV_E_LINDEX;

    if (!(pformatetc->tymed & TYMED_HGLOBAL))
        return DV_E_TYMED;

    /* Check if the requested data can be provided */
    if (pformatetc->cfFormat == This->cfExtInterface ||
        pformatetc->cfFormat == This->cfDisplayDevice ||
        pformatetc->cfFormat == This->cfDisplayName ||
        pformatetc->cfFormat == This->cfDisplayId ||
        pformatetc->cfFormat == This->cfDisplayKey ||
        pformatetc->cfFormat == This->cfDisplayStateFlags ||
        pformatetc->cfFormat == This->cfMonitorDevice ||
        pformatetc->cfFormat == This->cfMonitorName ||
        pformatetc->cfFormat == This->cfPruningMode)
    {
        return S_OK;
    }
#if DEBUG
    else
    {
        if (GetClipboardFormatName(pformatetc->cfFormat,
                                   szFormatName,
                                   sizeof(szFormatName) / sizeof(szFormatName[0])))
        {
            DPRINT1("CDevSettings::QueryGetData(\"%ws\")\n", szFormatName);
        }
        else
        {
            DPRINT1("CDevSettings::QueryGetData(Format %u)\n", (unsigned int)pformatetc->cfFormat);
        }
    }
#endif

    return DV_E_FORMATETC;
}
Esempio n. 13
0
static ULONG WINAPI DataObjectImpl_Release(IDataObject* iface)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    ULONG ref = InterlockedDecrement(&This->ref);
    TRACE("(%p) ref=%d\n",This, ref);

    if(!ref) {
        if(This->unicode) GlobalFree(This->unicode);
        if(This->rtf) GlobalFree(This->rtf);
        if(This->fmtetc) GlobalFree(This->fmtetc);
        heap_free(This);
    }

    return ref;
}
Esempio n. 14
0
static HRESULT WINAPI IDataObjectImpl_QueryInterface(IDataObject *iface, REFIID riid, void **ppvObj)
{
    IDataObjectImpl *This = impl_from_IDataObject(iface);

    if (IsEqualIID(riid, &IID_IUnknown) ||
        IsEqualIID(riid, &IID_IDataObject))
    {
        *ppvObj = This;
    }

    if(*ppvObj)
    {
        IDataObject_AddRef(iface);
        return S_OK;
    }

    return E_NOINTERFACE;
}
Esempio n. 15
0
static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC *pformatetc)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    UINT i;
    BOOL foundFormat = FALSE;
    TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", This, pformatetc->cfFormat, pformatetc->tymed);

    if(pformatetc->lindex != -1)
        return DV_E_LINDEX;

    for(i=0; i<This->fmtetc_cnt; i++) {
        if(This->fmtetc[i].cfFormat == pformatetc->cfFormat) {
            foundFormat = TRUE;
            if(This->fmtetc[i].tymed == pformatetc->tymed)
                return S_OK;
        }
    }
    return foundFormat?DV_E_FORMATETC:DV_E_TYMED;
}
Esempio n. 16
0
static HRESULT STDMETHODCALLTYPE
CDevSettings_EnumFormatEtc(IDataObject* iface,
                           DWORD dwDirection,
                           IEnumFORMATETC** ppenumFormatEtc)
{
    HRESULT hr;
    FORMATETC fetc[9];
    PCDevSettings This = impl_from_IDataObject(iface);

    *ppenumFormatEtc = NULL;

    if (dwDirection == DATADIR_GET)
    {
        pCDevSettings_FillFormatEtc(&fetc[0],
                                    This->cfExtInterface);
        pCDevSettings_FillFormatEtc(&fetc[1],
                                    This->cfDisplayDevice);
        pCDevSettings_FillFormatEtc(&fetc[2],
                                    This->cfDisplayName);
        pCDevSettings_FillFormatEtc(&fetc[3],
                                    This->cfDisplayId);
        pCDevSettings_FillFormatEtc(&fetc[4],
                                    This->cfDisplayKey);
        pCDevSettings_FillFormatEtc(&fetc[5],
                                    This->cfDisplayStateFlags);
        pCDevSettings_FillFormatEtc(&fetc[6],
                                    This->cfMonitorName);
        pCDevSettings_FillFormatEtc(&fetc[7],
                                    This->cfMonitorDevice);
        pCDevSettings_FillFormatEtc(&fetc[8],
                                    This->cfPruningMode);

        hr = SHCreateStdEnumFmtEtc(sizeof(fetc) / sizeof(fetc[0]),
                                   fetc,
                                   ppenumFormatEtc);
    }
    else
        hr = E_NOTIMPL;

    return hr;
}
Esempio n. 17
0
static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", This, pformatetc->cfFormat, pformatetc->tymed);

    if(pformatetc->lindex != -1)
        return DV_E_LINDEX;

    if(!(pformatetc->tymed & TYMED_HGLOBAL))
        return DV_E_TYMED;

    if(This->unicode && pformatetc->cfFormat == CF_UNICODETEXT)
        pmedium->u.hGlobal = This->unicode;
    else if(This->rtf && pformatetc->cfFormat == cfRTF)
        pmedium->u.hGlobal = This->rtf;
    else
        return DV_E_FORMATETC;

    pmedium->tymed = TYMED_HGLOBAL;
    pmedium->pUnkForRelease = (LPUNKNOWN)iface;
    IUnknown_AddRef(pmedium->pUnkForRelease);
    return S_OK;
}
Esempio n. 18
0
static HRESULT STDMETHODCALLTYPE
CDevSettings_QueryInterface(IDataObject* iface,
                            REFIID riid,
                            void** ppvObject)
{
    PCDevSettings This = impl_from_IDataObject(iface);

    *ppvObject = NULL;

    if (IsEqualGUID(riid,
                    &IID_IUnknown) ||
        IsEqualGUID(riid,
                    &IID_IDataObject))
    {
        *ppvObject = (PVOID)impl_to_interface(This, IDataObject);
        return S_OK;
    }
    else
    {
        DPRINT1("CDevSettings::QueryInterface: Queried unknown interface\n");
    }

    return E_NOINTERFACE;
}
Esempio n. 19
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}
Esempio n. 20
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppvObj);
}
Esempio n. 21
0
File: view.c Progetto: RPG-7/reactos
static ULONG WINAPI DataObject_Release(LPDATAOBJECT iface)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    return IWebBrowser2_Release(&This->IWebBrowser2_iface);
}
Esempio n. 22
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}
Esempio n. 23
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}
Esempio n. 24
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_EnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}
Esempio n. 25
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_SetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}
Esempio n. 26
0
static HRESULT WINAPI DataObjectImpl_DUnadvise(IDataObject* iface, DWORD dwConnection)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    FIXME("(%p): stub\n", This);
    return E_NOTIMPL;
}
Esempio n. 27
0
static HRESULT WINAPI DataObjectImpl_EnumDAdvise(IDataObject* iface, IEnumSTATDATA **ppenumAdvise)
{
    DataObjectImpl *This = impl_from_IDataObject(iface);
    FIXME("(%p): stub\n", This);
    return E_NOTIMPL;
}
Esempio n. 28
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}
Esempio n. 29
0
File: link.c Progetto: GYGit/reactos
static ULONG WINAPI IDataObject_fnRelease (IDataObject* iface)
{
    HlinkImpl *This = impl_from_IDataObject(iface);
    TRACE("%p\n", This);
    return IHlink_Release(&This->IHlink_iface);
}
Esempio n. 30
0
File: view.c Progetto: RPG-7/reactos
static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
{
    WebBrowser *This = impl_from_IDataObject(iface);
    FIXME("(%p)->()\n", This);
    return E_NOTIMPL;
}