Be sure to use the function prototypes in the Visual Basic declaration file to get the proper argument types.
- First, server IDs must be declared as Integer (2 bytes), and trip handles are declared as long integers.
- No functions in PC*MILER|Connect use variants, or native Basic strings.
- All arguments must be declared to be passed with the modifier ByVal. This is especially true for any arguments that accept strings.
- 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