Converting VB6 to VB.Net

trims30

Member
Joined
Aug 7, 2007
Messages
17
Programming Experience
10+
Am converting a VB6 project to VB.Net and need help with "AS ANY" type declaration in a function declaration.

Example:

Declare Function BtrCall Lib "wbtrv32.dll" Alias "BTRCALL" (ByVal op%, ByVal PB$, db As Any) as integer


I know As Any is invalid in VB.Net

Most of the calls to this function will pass a String for the 3rd parameter however, there are two instances in my code where a User Defined Type /Structure is passed rather than string value.

Can I safely use As Object instead of As Any here?

Any Suggestions as to how to work this?

Lee
 
As Object is the .Net closest equivalent to vb6's As Any.

In your case, you should be able to use Object just fine.
 
Back
Top