You are not using parentheses on line 555:
Change to:
ReadAllAnalog(CardAddress, Buffer(0))
In VB 2005 and VB.NET, all functions or subroutine calls require parentheses around the parameter list (even if the parameter list is empty) e.g.: SetAllDigital()
You are using:
Dim Buffer(0 To 7) As Long
Long is 64 bit integer in VB2005 and VB.NET.
“As Integer” is right in this case (32 bit integer).
Change to:
Dim Buffer(0 To 7) As Integer
Here are some useful links you can check for the differences between VB 6.0 and VB 2005.
Visual Basic Language Concepts: msdn2.microsoft.com/en-us/library/2x7h1hfk(VS.80.aspx
What’s New for Visual Basic 6.0 Users: msdn2.microsoft.com/en-us/library/ms172617(VS.80.aspx
Language Changes for Visual Basic 6.0 Users: msdn2.microsoft.com/en-us/library/skw8dhdd(VS.80.aspx
Very important!
Integer Data Type for Visual Basic 6.0 Users: msdn2.microsoft.com/en-us/library/7f5ztkz3(VS.80.aspx
This is important especially when calling DLL functions!
Parameter Passing Mechanism for Visual Basic 6.0 Users: msdn2.microsoft.com/en-us/library/41zywfyc(VS.80.aspx
For example:
Visual Basic 6.0 declaration: “As Long”
should be changed for Visual Basic 2005 to: “As Integer”
Visual Basic 6.0 declaration: “As Integer”
should be changed for Visual Basic 2005 to: “As Short”
In Visual Basic 6.0, if you do not specify ByVal or ByRef for a procedure parameter, the passing mechanism defaults to ByRef. This allows the variable passed into the procedure to be modified in the calling program.
When you declare a procedure in Visual Basic 2005, the passing mechanism defaults to ByVal for every parameter. This protects arguments against modification.
See also:
Array Bounds for Visual Basic 6.0 Users
Array Size Declaration for Visual Basic 6.0 Users
ReDim Statement for Visual Basic 6.0 Users
Data Type Changes for Visual Basic 6.0 Users
Universal Data Type Changes for Visual Basic 6.0 Users
Declaration Syntax for Visual Basic 6.0 Users
String Length Declaration for Visual Basic 6.0 Users
Structure Declaration for Visual Basic 6.0 Users
Variable Scope for Visual Basic 6.0 Users
Function Changes for Visual Basic 6.0 Users
Format Function for Visual Basic 6.0 Users
Date and Time for Visual Basic 6.0 Users
String ($) Function for Visual Basic 6.0 Users
Miscellaneous Language Changes for Visual Basic 6.0 Users
Boolean Operator for Visual Basic 6.0 Users
File Handling for Visual Basic 6.0 Users
Module Changes for Visual Basic 6.0 Users
Procedure Changes for Visual Basic 6.0 Users
Parameter Passing Mechanism for Visual Basic 6.0 Users
Procedure Calling Sequence for Visual Basic 6.0 Users
Procedure Declaration for Visual Basic 6.0 Users
etc…