DISPLAY DATABASE

Sys(2334)

SYS(2334) reports the Automation server's invocation mode. This function tells you how any method of your Automation server was invoked.

Usage

cStartedAs = SYS( 2334 )

Parameter

Value

Meaning

cStartedAs

Empty string or 0

Unknown. The method might be running as part of the initialization of the object (called from Init) or as a standalone EXE.

1

This method was called as part of an application server supporting VTable binding.

2

This method was called as part of an application server not supporting VTable binding, via the older IDispatch interface.


It might be important to your COM server's behavior to determine how it was invoked, although we haven't thought up a case for this yet. We're more likely to use StartMode to determine the environment in which the code is running, but if you need to distinguish between VTable and IDispatch invocations, here's the way to do it.

It's not documented, but SYS(2334) returns an empty string if you call it at times when none of the values are appropriate—for example, from the command line or within a routine that's not running as part of an OLEPUBLIC method. It returns 0 when operating as an Automation server in those methods that don't use either interface—for example, Init, Error or Destroy.

Example

IF SYS(2334) = "2"  && IDispatch call

See Also

StartMode, Sys(2333)


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net