Board index » delphi » Am I being used as an OLE automation server?

Am I being used as an OLE automation server?

Hello,

   I've created an OLE automation server and would like to know if
there's a quick way in the server code to ask the question, "Was I
loaded as an OLE Automation object (CreateOLEObject) or was I launched
as an ordinary application?".  The answer to this is probably simple,
but it is eluding me.

   Thanks for any help.

Steve
  Steve Magruder, Contractor
  LG&E Power Marketing, Inc.

 

Re:Am I being used as an OLE automation server?


On Tue, 25 Feb 1997 22:35:23 GMT, steve.magru...@lgeenergy.com (Steve

Quote
Magruder) wrote:
>   I've created an OLE automation server and would like to know if
>there's a quick way in the server code to ask the question, "Was I
>loaded as an OLE Automation object (CreateOLEObject) or was I launched
>as an ordinary application?".

In your OLE automation server unit (or anything else which uses the
OleAuto unit) you can get this from Automation.StartMode - this can be
smStandAlone, smAutomation, smRegServer or smUnregServer.

See the User Guide p367-368 for more details.

Re:Am I being used as an OLE automation server?


Quote
Steve Magruder wrote:

> Hello,

>    I've created an OLE automation server and would like to know if
> there's a quick way in the server code to ask the question, "Was I
> loaded as an OLE Automation object (CreateOLEObject) or was I launched
> as an ordinary application?".  The answer to this is probably simple,
> but it is eluding me.

>    Thanks for any help.

> Steve
>   Steve Magruder, Contractor
>   LG&E Power Marketing, Inc.

Chcek Automation.StartMode. A value of smStandalone means launched as an
ordinary app. Other values cover loaded as an OLE Automation object and
run to do OLE Automation registration/de-registration.

Chris Jobson

Other Threads