Yes, the
OpenConnection(...),
BeginSession(...), EndSession(...), and
CloseConnection() procedures are all methods of class
RequestProcessor, a running instance of which called
qbXMLRP has just been created with the operator
New.
The syntax shown up there is however inconsistent with the BASIC/VB6 tradition. Procedures used as commands (i.e. those that have their respective return values discarded) should either have no parentheses around their arguments, if any, or have parentheses and be preceeded with an obligatory CALL command. Parentheses without CALL won't compile.
So, whereas in
C and the like the equivalent code must be:
...
qbXMLRP.OpenConnection("", "Sample App");
ticket = qbXMLRP.BeginSession("", qb_FILEOPEN_DONOTCARE);
...
qbXMLRP.EndSession(ticket);
qbXMLRP.CloseConnection();
...
its
valid VB6 variant should be either:
...
qbXMLRP.OpenConnection "", "Sample App"
ticket = qbXMLRP.BeginSession("", qbFileOpenDoNotCare) ' parens mandatory here!
...
qbXMLRP.EndSession ticket
qbXMLRP.CloseConnection
...
or:
...
CALL qbXMLRP.OpenConnection("", "Sample App")
ticket = qbXMLRP.BeginSession("", qbFileOpenDoNotCare) ' parens mandatory here!
...
CALL qbXMLRP.EndSession(ticket)
CALL qbXMLRP.CloseConnection()
...
Unparenthesized and CALLed parenthesized commands may be interleaved in user code but each of them must be properly formatted as described above. Interleaved programming style is however poor for quick understanding and easy maintenance of VB6 programs.