I setup the DllImport attribute as shown below;<BR> &#060;DllImport("ssasea.dll", EntryPoint:="_snx001@12", SetLastError:=True, CharSet:=CharSet.Unicode, _<BR> ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)&#062 ; _<BR> Public Shared Function ids_connect(ByVal RemoteHost As String, ByVal RemotePort As Long, ByRef P3 As Long) As Long<BR> &#039; Leave function empty - DLLImport attribute forwards calls to ids_connect to<BR> &#039; _snx001@12 in ssasea.dll. Unicode appends char W if method exists in the dll<BR> End Function<BR><BR>The setup I believe is fine but when I run this method I keep getting "Object reference not set to an instance of an object." I tried to play around with by creating a new instance of the class to no avail. Does anyone have an idea what am I missing. Your help is very much appreciated.