Top  Previous  Next


The QMCreateObject() function creates an instance of the named class on the server, returning a numeric value that can be used in other QMClient functions that reference this object. This value is returned as zero if instantiation fails.


The function arguments are:


Classis the name of the QM class from which the object is to be instantiated.


ArgCtis the number of argument values following. This argument is not present in all variants of the QMClient API.


Arg1...is a series of argument values as strings. A maximum of 20 arguments may be given.


The argument values are passed into the CREATE.OBJECT public subroutine, if this exists.


When using the C and VB.Net versions of the QMClient API, arguments must be passed as strings. Any argument values updated by the CREATE.OBJECT subroutine can be retrieved using the QMGetArg() function.


For the old Visual Basic version of the QMClient API, the original variables are updated with any modifications from the CREATE.OBJECT subroutine.


The object remains instantiated until either the connection is closed or the QMDestroyObject() function is used.


The QMCLIENT configuration parameter can be used to restrict QMCreateObject() to instantiating only classes that have been compiled with the $QMCALL compiler directive. Use of this feature prevents a malicious application that uses the QMClient API calling other subroutines that might not perform adequate security validation to protect the system.


The example program fragments below instantiate an object based on the CONNECTION class, passing in two argument strings.







hmtoggle_plus1QMBasic Class Module







See also:

QMDestroyObject, QMGet(), QMSet