company logo

opai :: CreateGlobalVariable - Create Global variable

The property handle passed is used as pattern for creating a global variable. For defining the global variable, a copy of the property handle will be defined and returned. Global variables must have unique names in the field name of the property handle. You may pass a variable name, which will be used for the variable instead of the field name defined in the property handle passed. A global variable can be created only once for the same variable name.

In case of multi-thread applications, global variables are defined separately for each thread and must be unique for each thread, only.

Return value:  Pointer to roperty handle ( PropertyHandle * )

Implementation details

PropertyHandle * opai  :: CreateGlobalVariable ( PropertyHandle &prophdl_ref, NString &var_name )
  • prophdl_ref - Reference to Property handle
  • var_name - Option name

    The name refers to an option set on the server or client side. Option names may be defined simply as an identifier (main option) or as an option hierarchy path when the option is defined on a lower level of the option hierarchy.