🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1059

Re: Help with Delphi Translation

#1059
From: Remy Lebeau (TeamB)
Date: Mon, 26 Sep 2005 17:14
54 lines
2861 bytes
"mike" <mfbrowne@earthlink.nnet> wrote in message
news:4336bfa0$1@newsgroups.borland.com...

> [C++ Warning] Unit1.cpp(45): W8037 Non-const function __stdcall
> IWebBrowser::Get_Document(_di_IDispatch &) called for const object

That is not an error.  It is, however, caused by the function's Browser
parameter being declared as 'const'.  Try removing the 'const'.

Also, you are not using the code I gave you.  My code calls
IWebBrowser2::get_Document(IDispatch**), not
IWebBrowser2::Get_Document(_di_IDispatch&).  Please copy-paste the code
as-is.

> [C++ Error] Unit1.cpp(45): E2064 Cannot initialize '_di_IDispatch &' with
> 'IDispatch * *'
>
> [C++ Error] Unit1.cpp(45): E2342 Type mismatch in parameter
> 'Get_Document_result' (wanted '_di_IDispatch &', got 'IDispatch * *')

Those are side-effects of you not using the code I gave you.

> [C++ Error] Unit1.cpp(50): E2316 'get_all' is not a member of
> 'IHTMLDocument2'

Yes, it is.  In fact, it is the very first method declared in
IHTMLDocument2:

    --- mshtml.h ---

    MIDL_INTERFACE("332c4425-26cb-11d0-b483-00c04fd90119")
    IHTMLDocument2 : public IHTMLDocument
    {
    public:
        virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_all(
            /* [out][retval] */ IHTMLElementCollection __RPC_FAR *__RPC_FAR
*p) = 0;
        //...
    };


> [C++ Error] Unit1.cpp(51): E2034 Cannot convert 'TVariant' to 'OleVariant'
<snip>

The rest of the errors lead me to think that you are not using Microsoft's
original HTML interfaces at all, but instead are accessing some VCL-specific
interfaces instead.  Had you been using Microsoft's interfaces directly,
OleVariant would not be needed at all.  You also would not be having
problems with any of the _di_... typedefs or "xxx is not a member of ..."
errors, either.


Gambit
Technical Details
Message-ID: <43382c29$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <43359db7@newsgroups.borland.com> <4335b4c4$1@newsgroups.borland.com> <4336bfa0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,5d71e42a8af639c6
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <43359db7@newsgroups.borland.com> <4335b4c4$1@newsgroups.borland.com> <4336bfa0$1@newsgroups.borland.com>
Subject: Re: Help with Delphi Translation
Date: Mon, 26 Sep 2005 10:14:24 -0700
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <43382c29$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1127754793 68.69.17.41 (26 Sep 2005 10:13:13 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail