Assuming you are using VB.NET, you do it the same as you did in VB6, with Public Declare Function SomeFunction Lib "netapi32.dll" (argument As Integer, argument2 As Integer)At which point use SomeFunction as usual. Remember, if you are translating the definitions from VB6 to change all Longs to Integers in VB.NET.
If you are using C#, do what BrianHanson said.