Hello,
I 've faced with a problem when using APi in vb.net. The APi i used is working fine in vb6 but it seems not working in vb.net. Can anybody out there help me?
**Problem:I want to check whether the MS Access driver is Exist in the pc or not... the API will return 0 (found) in vb6 but return numeric (not found) on vb.net.
** The driver is exist in this testing.
May i know what's wrong with it?
vb6
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByVal phkResult As Long) As Long
Dim bRes As Boolean
Dim lRes As Long
Dim hKey As Long
lRes = RegOpenKeyEx(&H80000002, _
"SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access Driver (*.mdb)", _
0&, _
&H1, _
hKey)
![]()
![]()
![]()




Reply With Quote