Board index » delphi » Help, GetActiveOleObject

Help, GetActiveOleObject

I understand what createOLEObject is doing, but I am unsure about
GetActiveOLEObject.  From the examples that I have seen in this newsgroup
(Word, Excel, etc...) this seems to be the unoffical standard for accessing
COM objects.  From the looks of it, the GetActiveOLEObject would allow for
less loading time, but how does it work?

Bored you all for long enough.  Time for my questions.

  Will it work only with EXE. servers, of will it work with ocx's too?
  Does there need to be something declared in the COM interface to allow for
this type of access?
  Any web information would be appreciated, but not neccisary.

TIA

Charles

 

Re:Help, GetActiveOleObject


Hi Charles.

My understanding of GetActiveOLEObject is this.  When you ask for an OLE
object using this function (which is a Delphi wrapper to GetActiveObject),
COM looks for the GUID in something called the Running Object Table
(ROT).  If it finds the GUID it returns the pointer, and the active object
is theoretically the last activated object.

Regarding access from the different servers, I would expect that their is no
distinction.  The method for getting into the ROT is by calling
RegisterActiveObject and RevokeActiveObject to remove it from the ROT.

Does this help?

Nick.

Charles E. Shane <CSh...@automation.pinncorp.com> wrote in message
news:7ufoj2$s6813@forums.borland.com...

Quote
> I understand what createOLEObject is doing, but I am unsure about
> GetActiveOLEObject.  From the examples that I have seen in this newsgroup
> (Word, Excel, etc...) this seems to be the unoffical standard for
accessing
> COM objects.  From the looks of it, the GetActiveOLEObject would allow for
> less loading time, but how does it work?

> Bored you all for long enough.  Time for my questions.

>   Will it work only with EXE. servers, of will it work with ocx's too?
>   Does there need to be something declared in the COM interface to allow
for
> this type of access?
>   Any web information would be appreciated, but not neccisary.

> TIA

> Charles

Re:Help, GetActiveOleObject


Nick,

This helps - but how do you call RegisterActiveObject for your own app? - so
that my client's and other apps can use GetActiveOLEObject to access my app.

There is no explanation of RegisterActiveObject in the Delphi help and the
WinAPI help does not explain how to get access the the parameters required by
RegisterActiveObject

Thanks

Mark

Quote
Nicholas Robinson wrote:
> Hi Charles.

> My understanding of GetActiveOLEObject is this.  When you ask for an OLE
> object using this function (which is a Delphi wrapper to GetActiveObject),
> COM looks for the GUID in something called the Running Object Table
> (ROT).  If it finds the GUID it returns the pointer, and the active object
> is theoretically the last activated object.

> Regarding access from the different servers, I would expect that their is no
> distinction.  The method for getting into the ROT is by calling
> RegisterActiveObject and RevokeActiveObject to remove it from the ROT.

> Does this help?

> Nick.

> Charles E. Shane <CSh...@automation.pinncorp.com> wrote in message
> news:7ufoj2$s6813@forums.borland.com...
> > I understand what createOLEObject is doing, but I am unsure about
> > GetActiveOLEObject.  From the examples that I have seen in this newsgroup
> > (Word, Excel, etc...) this seems to be the unoffical standard for
> accessing
> > COM objects.  From the looks of it, the GetActiveOLEObject would allow for
> > less loading time, but how does it work?

> > Bored you all for long enough.  Time for my questions.

> >   Will it work only with EXE. servers, of will it work with ocx's too?
> >   Does there need to be something declared in the COM interface to allow
> for
> > this type of access?
> >   Any web information would be appreciated, but not neccisary.

> > TIA

> > Charles

--
SIMUL8 Corporation
http://www.SIMUL8.com/

Re:Help, GetActiveOleObject


Check out Tip #19 on the Tips and Tricks section on my page

have fun
--
Binh Ly
Visit my COM Notes at http://www.castle.net/~bly/com

Quote
Mark Elder <mar...@VisualT.com> wrote in message

news:38200255.6EA6C253@VisualT.com...
Quote
> Nick,

> This helps - but how do you call RegisterActiveObject for your own app? -
so
> that my client's and other apps can use GetActiveOLEObject to access my
app.

> There is no explanation of RegisterActiveObject in the Delphi help and the
> WinAPI help does not explain how to get access the the parameters required
by
> RegisterActiveObject

> Thanks

> Mark

Other Threads