1 Imports Microsoft.VisualBasic
\r
3 Public Class TestClass
\r
4 Private Declare Function SQLCancel Lib "ODBC32.dll" _
\r
5 (ByVal hstmt As Integer) As Long
\r
6 Public Function Test() As String
\r
9 Dim myhandle As Integer
\r
10 ' Call with invalid argument.
\r
11 Dim d as Integer = SQLCancel(myhandle)
\r
12 Return Err.LastDllError
\r