How do I integrate QAS API Products using VB.Net?
Associated product(s): Product name: NameTracer | Implementation: API | OS: Windows (more products)
Product name: Rapid | Implementation: API | OS: Windows
Product name: Healthcoder | Implementation: API | OS: Windows
Product name: Batch | Implementation: API | OS: Windows
Views: 1342 | Created: 2 years ago | Last updated: 2 years ago
This documents highlights the primary differences between VB X (e.g. 6) and VB.Net integrations so that Visual Basic integrations can be successfully ported to a VB.Net environment.
Code Changes Required
The primary differences between the VB sample code provided with the current API products and the VB.Net code required are as follows:
1. Function return values declared as Long must be changed to Integer. Similarly, arguments passed to these functions that were declared as Longs must also be declared as Integers. When changing these declarations be sure to change them in the declarations BAS module as well as the code itself.
Example
Declare Function QAPro_Search Lib "QAPUIEB.DLL" (ByVal vs1 As String) As Long
becomes
Declare Function QAPro_Search Lib "QAPUIEB.DLL" (ByVal vs1 As String) As Integer
Additionally, any variables that are declared as type Integer must now be declared as Short.
2. Strings in the VB.Net environment can no longer be declared with an absolute length, which means that string declarations such as Dim addBuffer As String * 200 are not compatible. Subsequently strings must be declared as follows.
Dim addBuffer As String
addBuffer = Space (200)
Further information on upgrading applications from VB 6 to VB.Net can be found at:
http://msdn.microsoft.com/library/default.asp?URL=/library/techart/vb6tovbdotnet.htm
Send to friend