Sys(2333)

SYS(2333) allows Visual FoxPro to take advantage of ActiveX controls that support VTable binding, an interface that can speed processing. Unfortunately, many controls fail when this interface is enabled.

Usage

cSetting = SYS( 2333 [, nSetting ] )

Parameter

Value

Meaning

cSetting

Character

The resultant setting after the function runs, as a one-character string (not an integer).

nSetting

0 or omitted

Interface is disabled. This is the default for VFP 6 and later.

1

Interface is enabled. This is VFP 5's default, and it seemed like a good idea at the time.

2

Returns the current setting.


VTable binding is a faster method of talking with ActiveX controls. Controls supporting this feature store a virtual table of their internal functions and allow more direct access to those functions. Without VTable binding, every call to an ActiveX control has to go through several steps to access the function it calls. While VTable binding is a great idea, far too few of the third-party controls implement the interface correctly, leading to lots of problems when VFP 5 developers attempted to integrate those controls into their applications. For this reason, Microsoft chose to change the default behavior of Visual FoxPro beginning in the 6.0 product to disable this interface by default.If you know the control you are working with supports VTable binding, try turning on SYS(2333) to see if it improves performance. But if you run into crashes and weird behaviors, be prepared to turn it off again.

Example

? SYS(2333)    && Sets and returns the default "0"
? SYS(2333,0)  && Same effect as the previous command
? SYS(2333,1)  && Enables VTable binding and returns "1"
? SYS(2333,2)  && Returns the current setting, "1"

See Also

AutoYield, Sys(2334)


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .