Board index » delphi » Function: I was called by an Automation method

Function: I was called by an Automation method


2004-03-03 10:28:51 PM
delphi118
Iīve got a procedure called Test
The procedure Test will be called when the user presses a button,
or when a OLE Automation method is called.
Is there any way to find out if the procedure was called as a result of an
Automation method?
Best regards,
Lasse
 
 

Re:Function: I was called by an Automation method

Lasse writes:
Quote
I4ve got a procedure called Test

The procedure Test will be called when the user presses a button,
or when a OLE Automation method is called.

Is there any way to find out if the procedure was called as a result
of an Automation method?

What's the other way you call it? In this "other" way can you call
another (non automation exposed) function before and set some member
variable so that you know that all calls to this instance are through
automation (member variable is not set) or through your "other" way.
--
Deepak Shenoy (TeamB)
Agni Software
www.agnisoft.com
 

Re:Function: I was called by an Automation method

"The other way" is when the user presses a button or some other
userinterface interaction.
Yes, of course I could set a boolean when entering an Automation method and
resetting it when exiting the method, but I was looking for some generel
way. I have a lot of Automation methods... Still this isnīt working with
multible threads are running
"Deepak Shenoy" <XXXX@XXXXX.COM>writes
Quote
Lasse writes:

>I4ve got a procedure called Test
>
>The procedure Test will be called when the user presses a button,
>or when a OLE Automation method is called.
>
>Is there any way to find out if the procedure was called as a result
>of an Automation method?
>

What's the other way you call it? In this "other" way can you call
another (non automation exposed) function before and set some member
variable so that you know that all calls to this instance are through
automation (member variable is not set) or through your "other" way.

--
Deepak Shenoy (TeamB)
Agni Software
www.agnisoft.com