I don't know about VB.NET, but to use DLL functions in VB6:
code:
Declare Function <fn-name> Lib "<lib>" Alias "<realname>" (<args>) As <type>
For example, RegOpenKeyEx:
code:
Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long