Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TWebBrowser and OleInitialize

316 views
Skip to first unread message

Jason Packwood

unread,
Feb 21, 1999, 3:00:00 AM2/21/99
to
Hello,

I remember seeing a post about runtime errors and invalid pointers using
TWebBrowser. I am having the same problem. The solution was to use the
following at the end of the unit:

initialization
OleInitialize(nil);

finalization
OleUnInitialize;

Well I have tried this but Delphi does not recognize these WinAPI calls.
Does anyone know what unit these are declared in? Or do I just not
understand how to use the WinAPI with Delphi?

Any help is much appreciated.

Jason Packwood


M.Harry

unread,
Feb 22, 1999, 3:00:00 AM2/22/99
to
Jason,

Put the statements at the VERY END of the unit. After the last end...
e.g.

>end;
>end.
>initialization
> OleInitialize(nil);
>
>finalization
> OleUnInitialize;

and that should do the trick.

MH.
ps. worked fine for me.


Jason Packwood wrote in message <7aqnuq$ob...@forums.borland.com>...

john_mctaggart

unread,
Feb 22, 1999, 3:00:00 AM2/22/99
to
On Sun, 21 Feb 1999 23:51:18 -0500, "Jason Packwood"
<jas...@c2r-net.com> wrote:

>Hello,
>
>I remember seeing a post about runtime errors and invalid pointers using
>TWebBrowser. I am having the same problem. The solution was to use the
>following at the end of the unit:
>
>initialization
> OleInitialize(nil);
>
>finalization
> OleUnInitialize;

Make sure ActiveX is in your units clause.

JE McTaggart

john_mctaggart

unread,
Feb 23, 1999, 3:00:00 AM2/23/99
to

Make that the uses clause...

John McTaggart

Jason Packwood

unread,
Feb 24, 1999, 3:00:00 AM2/24/99
to

M.Harry <mharr...@my-dejanews.com> wrote in message
news:7araef$po...@forums.borland.com...

>Jason,
>
>Put the statements at the VERY END of the unit. After the last end...
>e.g.
>
>>end;
>>end.
>>initialization
> > OleInitialize(nil);
>>
>>finalization
>> OleUnInitialize;


That seemed to do the trick. Thanks!

Jason Packwood


Toby Piper

unread,
Feb 25, 1999, 3:00:00 AM2/25/99
to
Jason,

If you haven't discovered it by now, you need to include the ActiveX unit in
your uses clause.

Toby


Jason Packwood wrote in message <7aqnuq$ob...@forums.borland.com>...

>Hello,
>
>I remember seeing a post about runtime errors and invalid pointers using
>TWebBrowser. I am having the same problem. The solution was to use the
>following at the end of the unit:
>
>initialization
> OleInitialize(nil);
>
>finalization
> OleUnInitialize;
>

0 new messages