예제 #1
0
파일: xmlview.c 프로젝트: RareHare/reactos
static HRESULT WINAPI XMLView_PersistHistory_GetPositionCookie(
        IPersistHistory *iface, DWORD *pdwPositioncookie)
{
    XMLView *This = impl_from_IPersistHistory(iface);
    FIXME("(%p)->(%p)\n", This, pdwPositioncookie);
    return E_NOTIMPL;
}
예제 #2
0
파일: persist.c 프로젝트: GeonHun/wine
static HRESULT WINAPI PersistHistory_SaveHistory(IPersistHistory *iface, IStream *pStream)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    ULONG len, written;
    BSTR display_uri;
    HRESULT hres;

    TRACE("(%p)->(%p)\n", This, pStream);

    if(!This->window || !This->window->uri) {
        FIXME("No current URI\n");
        return E_FAIL;
    }

    /* NOTE: The format we store is *not* compatible with native MSHTML. We currently
     * store only URI of the page (as a length followed by a string) */
    hres = IUri_GetDisplayUri(This->window->uri, &display_uri);
    if(FAILED(hres))
        return hres;

    len = SysStringLen(display_uri);
    hres = IStream_Write(pStream, &len, sizeof(len), &written);
    if(SUCCEEDED(hres))
        hres = IStream_Write(pStream, display_uri, len*sizeof(WCHAR), &written);
    SysFreeString(display_uri);
    return hres;
}
예제 #3
0
파일: xmlview.c 프로젝트: RareHare/reactos
static HRESULT WINAPI XMLView_PersistHistory_SaveHistory(
        IPersistHistory *iface, IStream *pStream)
{
    XMLView *This = impl_from_IPersistHistory(iface);
    FIXME("(%p)->(%p)\n", This, pStream);
    return E_NOTIMPL;
}
예제 #4
0
파일: xmlview.c 프로젝트: RareHare/reactos
static HRESULT WINAPI XMLView_PersistHistory_LoadHistory(
        IPersistHistory *iface, IStream *pStream, IBindCtx *pbc)
{
    XMLView *This = impl_from_IPersistHistory(iface);
    FIXME("(%p)->(%p %p)\n", This, pStream, pbc);
    return E_NOTIMPL;
}
예제 #5
0
파일: xmlview.c 프로젝트: RareHare/reactos
static HRESULT WINAPI XMLView_PersistHistory_GetClassID(
        IPersistHistory *iface, CLSID *pClassID)
{
    XMLView *This = impl_from_IPersistHistory(iface);
    FIXME("(%p)->(%p)\n", This, pClassID);
    return E_NOTIMPL;
}
예제 #6
0
파일: persist.c 프로젝트: GeonHun/wine
static HRESULT WINAPI PersistHistory_LoadHistory(IPersistHistory *iface, IStream *pStream, IBindCtx *pbc)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    ULONG str_len, read;
    WCHAR *uri_str;
    IUri *uri;
    HRESULT hres;

    TRACE("(%p)->(%p %p)\n", This, pStream, pbc);

    if(!This->window) {
        FIXME("No current window\n");
        return E_UNEXPECTED;
    }

    if(pbc)
        FIXME("pbc not supported\n");

    if(This->doc_obj->client) {
        IOleCommandTarget *cmdtrg = NULL;

        hres = IOleClientSite_QueryInterface(This->doc_obj->client, &IID_IOleCommandTarget,
                (void**)&cmdtrg);
        if(SUCCEEDED(hres)) {
            IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 138, 0, NULL, NULL);
            IOleCommandTarget_Release(cmdtrg);
        }
    }

    hres = IStream_Read(pStream, &str_len, sizeof(str_len), &read);
    if(FAILED(hres))
        return hres;
    if(read != sizeof(str_len))
        return E_FAIL;

    uri_str = heap_alloc((str_len+1)*sizeof(WCHAR));
    if(!uri_str)
        return E_OUTOFMEMORY;

    hres = IStream_Read(pStream, uri_str, str_len*sizeof(WCHAR), &read);
    if(SUCCEEDED(hres) && read != str_len*sizeof(WCHAR))
        hres = E_FAIL;
    if(SUCCEEDED(hres)) {
        uri_str[str_len] = 0;
        hres = create_uri(uri_str, 0, &uri);
    }
    heap_free(uri_str);
    if(FAILED(hres))
        return hres;

    hres = load_uri(This->window, uri, BINDING_FROMHIST);
    IUri_Release(uri);
    return hres;
}
예제 #7
0
파일: persist.c 프로젝트: GeonHun/wine
static HRESULT WINAPI PersistHistory_GetClassID(IPersistHistory *iface, CLSID *pClassID)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    return IPersistFile_GetClassID(&This->IPersistFile_iface, pClassID);
}
예제 #8
0
파일: persist.c 프로젝트: GeonHun/wine
static ULONG WINAPI PersistHistory_Release(IPersistHistory *iface)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    return htmldoc_release(This);
}
예제 #9
0
파일: persist.c 프로젝트: GeonHun/wine
static ULONG WINAPI PersistHistory_AddRef(IPersistHistory *iface)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    return htmldoc_addref(This);
}
예제 #10
0
파일: persist.c 프로젝트: GeonHun/wine
static HRESULT WINAPI PersistHistory_QueryInterface(IPersistHistory *iface, REFIID riid, void **ppv)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    return htmldoc_query_interface(This, riid, ppv);
}
예제 #11
0
파일: persist.c 프로젝트: GeonHun/wine
static HRESULT WINAPI PersistHistory_SetPositionCookie(IPersistHistory *iface, DWORD dwPositioncookie)
{
    HTMLDocument *This = impl_from_IPersistHistory(iface);
    FIXME("(%p)->(%x)\n", This, dwPositioncookie);
    return E_NOTIMPL;
}
예제 #12
0
파일: xmlview.c 프로젝트: RareHare/reactos
static ULONG WINAPI XMLView_PersistHistory_Release(IPersistHistory *iface)
{
    XMLView *This = impl_from_IPersistHistory(iface);
    return IPersistMoniker_Release(&This->IPersistMoniker_iface);
}
예제 #13
0
파일: xmlview.c 프로젝트: RareHare/reactos
static HRESULT WINAPI XMLView_PersistHistory_QueryInterface(
        IPersistHistory *iface, REFIID riid, void **ppvObject)
{
    XMLView *This = impl_from_IPersistHistory(iface);
    return IPersistMoniker_QueryInterface(&This->IPersistMoniker_iface, riid, ppvObject);
}