Question about function "HTMLDocument_write"

Ivan Sinitsin ivan at
Tue Mar 11 08:44:37 CDT 2008

On Monday the patch realizing this function has been accepted. It works 
perfectly, but hyperlinks do not work.
If I makes this function that way:

static HRESULT WINAPI HTMLDocument_write(IHTMLDocument2 *iface, SAFEARRAY 
    HRESULT hres;
    VARIANT *pvar;
    IHTMLElement *pbody;
    BSTR vtext;
    int i;

    vtext = SysAllocString(L"");


    hres = IHTMLElement_get_innerHTML(pbody, &vtext);
    if (FAILED(hres)) {
        vtext = SysAllocString(L"");

    hres=SafeArrayAccessData(psarray, (void **)&pvar);
    if (FAILED(hres)) return hres;
    for (i=0; i < psarray->rgsabound[0].cElements; i++) {
        hres = VarBstrCat(vtext, V_BSTR(&(pvar[i])), &vtext);
        if (FAILED(hres)) {

    hres = SafeArrayUnaccessData(psarray);

    return S_OK;

hyperlinks works good.

Why so occurs?

More information about the wine-devel mailing list