PInvoke is the mechanism by which .NET languages can call unmanaged functions in DLLs. This is especially useful for calling Windows API functions that aren’t encapsulated by the .NET Framework classes, as well as for other third-party functions provided in DLLs.
Using PInvoke in VB.NET to call RTSLINK DLL functions
There are mainly two ways in which you can use PInvoke in VB
1) Using the Declare Statement
2) Using DllImport
Declare Auto Function RTSOpen Lib "RTSLINK.DLL" Alias "Open" () As LongUsing the Declare Statement
Declare Auto Function Send Lib "RTSLINK.DLL" (ByVal strRequestXML As String) As Long
Declare Auto Function GetLastErrorMessage Lib "RTSLINK.DLL" () As String
Remarks:-
For more information on using PInvoke in VB.NET, please refer the article at CodeProject