I am using the TWebBrowser MS ActiveX control and want to pass a parameter
in the Flags of the Navigate2 method. This is declared in the TLB as
follows:

    procedure Navigate2(var URL, Flags, TargetFrameName, PostData, Headers:
OleVariant); safecall;

I have the following declarations

var A, B : OleVariant;

and make the following calls

        B := 4;

PlannerViewer.Navigate2('http://pdunford.godzone.net.nz/display.php',B,A,A,A
);

The compiler refuses to compile the second line citing "Type of actual and
formal var parameters must be identical".

Note that you can safely pass an unassigned olevariant parameter but as soon
as you assign something to it the compiler throws a fit.

An explicit cast in the assignation,    B := OleVariant(4); does not impress
the compiler either.

the only thought being that OleVariant must be an abstract type (if there is
such a thing)

I have to pass 4 in the Flags parameter to force IE to reload the page
without going through the internal cache, as this is a dynamically generated
PHP page that needs to be reloaded from the server to update each time.

=======================================================================
Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/

   "Or again, how can anyone enter a strong man's house and carry
off his possessions unless he first ties up the strong man? Then he
can rob his house."
    -- Matthew 12:29
http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20001229
=======================================================================
Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to