• This document refers to development in Visual Basic 6.0.
    For information regarding WinDriver’s support forVisual Basic .NET, refer to Technical Document #128.
  • Beginning with version 11.2.0 of WinDriver, Visual Basic 6.0 is no longer supported.

WinDriver provides you with the function WD_VB_GetAddress() for getting a pointer to a variable — i.e., its address. To obtain the pointer to a variable the function must be called as

   pBuffer = WD_VB_GetAddress (test, 1, 1)
   ' where "test" is the variable whose pointer is required.
' The other two parameters must always be one.

You can also use Visual Basic’s VarPtr() function to get the pointer to a variable (i.e., it’s address).

You can refer to the WinDriver Visual Basic samples and generated DriverWizard code for examples of using both WD_VB_GetAddress() andVarPtr() to acquire a pointer to a variable in Visual Basic.