Be sure to use the function prototypes in the Visual Basic declaration file to get the proper argument types.

  1. First, server IDs must be declared as Integer (2 bytes), and trip handles are declared as long integers.
  2. No functions in PC*MILER Connect use variants, or native Basic strings.
  3. All arguments must be declared to be passed with the modifier ByVal. This is especially true for any arguments that accept strings.
  4. String arguments that are modified by PC*MILER Connect must have their space declared beforehand. PC*MILER Connect does not dynamically resize Basic strings. For example, to get the text of error string #101, do either of the following:
Dim bytes As Integer
Dim buffer As String * 50
Dim buff2 As String

bytes = PCMSGetErrorString(101, buffer, 50)
buff2 = String(40, Chr(0))
bytes = PCMSGetErrorString(101, buff2, Len(buff2))

Strings utilities