Login  
Search All Forums
Dart Home | PowerTCP Emulation for ActiveX | Custom Development Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums   
AuthorForum: PowerTCP Emulation / Telnet for ActiveX
Topic: simple telnet client
acecase

From: bovill, KS USA
Posts: 4
Member Since: 11/28/04
posted November 28, 2004 3:31 PM

Hello,
 I have started developing an aplication that acts as a client/control for a video server running VDR and streamdev and I have gotten in over my head :)

I have the client doing everything I need it to do with the video stream but I need a way to access the vdr(linux) server via telnet to issue commands directly against VDR and VLC.

I found dart emulator and telnet controls and I figured it would be very simple to use. I was wrong. At least for a newb. I'm sure they are very simple for a real developer.

All the vb.net source code provided looks very simple but it just doesn't compile in vs.net 2k3.

Can someone please post some sample code for adding a telnet vt100 term emu to my form in vb.net?

Thanks
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 28, 2004 5:08 PM

Everything compiles fine for me. What's the exact error that you get?
acecase

From: bovill, KS USA
Posts: 4
Member Since: 11/28/04
posted November 28, 2004 6:12 PM

As an example the Emulator tool incloods a VB.NET example called "VT Emulator".
When I open it, first vs.net asks me if I want to convert it. I select yes and it opens it. As soon as it open my task list shows the following...

Type 'AxDartTelnet.AxTelnet' is not defined
Type 'AxDartTelnet.AxTelnet' is not defined
Type 'AxDartTelnet._ITelnetEvents_ErrorEvent' is not defined
The referenced component 'AxInterop.DartTelnet_1_0' could not be found. Invalid Primitive Type: System.Reflection.Missing. Only CLS compliant primitive types can be used. Consider using CodeObjectCreateExpression.

I doubt I need to tell you that the last is causeing the others.

I also get an error message similar to the last if I try to drag the telent control from the toolbar to my form.

Thank you.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 28, 2004 7:02 PM

My apologies. I saw 2003 and I thought you were using the .NET components. Now I see that you are using the Active components in VB.NET

WHat you are experiencing is a side effect of installing the latest .NET framework service pack (sp 1 for fw 1.1 or sp3 for fw 1.0)

The only way to eliminate the problem until the Microsoft approved hotfix is released is to uninstall the service pack.

When the hotfix is released (hopefully very soon) I will post here with more info.
acecase

From: bovill, KS USA
Posts: 4
Member Since: 11/28/04
posted November 28, 2004 9:22 PM

ic :)
thank you.

I would actualy rather use the .net components (lol thought I was but you're rite Im not).
I'll download those and see what i can't do :)

Thanks again.
acecase

From: bovill, KS USA
Posts: 4
Member Since: 11/28/04
posted November 29, 2004 10:53 AM

Ok I normaly don't double-post but...
I got the emulation for .net package and it's great.
The documentation is also alot better then what I had before. I love it. I'm a newb and with the documentation, it took me about 30min. to build the simple telnet term emulator that I needed using VB.Net and another 10min. to do the same using C#.
Great product. I will defenetly be putting in a request to purchase a license.
Thank you.

PS. If I may nag you for one more thing?
I can't find a vt property that will let me get rid of the scroll-bars. Is that possible?

Thanks again.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 29, 2004 11:02 AM

Set the scrollback buffer size to 0 and make the wide enough so that an entire row fits on one line.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 3, 2004 2:26 PM

The hotfixes are now available:

For Framework 1.0 (All OS):

http://www.dart.com/downloads/mshotfixes/NDP1.0sp3-KB887813-X86-Enu.exe

For Framework 1.1 (All OS except Server 2003):

http://www.dart.com/downloads/mshotfixes/NDP1.1sp1-KB886802-X86.exe

For Framework 1.1 (Server 2003 only):

http://www.dart.com/downloads/mshotfixes/WindowsServer2003-KB886802-x86-enu.exe

AlEdlund

From: Crystal Lake, IL USA
Posts: 26
Member Since: 06/25/04
posted December 7, 2004 1:22 PM

It's interesting I came back to the samples to look at some things (redownloaded and reinstalled) and for this sample code (telnet client) in vb.net (also at vs.net 2003). Not sure if it's the sample code (missing field entries), more extensive testing by vs.net, or what

Al


      Case "RLOGIN"
        bExpandCrLf = False ' Don't expand newlines to cr/lf for RLOGIN
        Telnet1.Rlogin(RemoteAddr, Username, , , , 80, , , , , LocalPort)
      Case "RSH"
        bExpandCrLf = True ' Expand newlines to cr/lf for RSH
        ACK = True ' Reset after ACK/NACK is received
        Telnet1.Rsh(RemoteAddr, Username, Cmd, , , LocalPort)
      Case "REXEC"
        bExpandCrLf = True ' Expand newlines to cr/lf for REXEC
        ACK = True ' Reset after ACK/NACK is received
        Telnet1.Rexec(RemoteAddr, Username, Password, Cmd, , , LocalPort)
      Case Else
        If RemotePort = 23 Then
          ' TELNET
          bExpandCrLf = False ' Don't expand newlines to cr/lf for TELNET
          Telnet1.AutoOption = True ' Perform auto-option negotiation for TELNET
        End If
        Telnet1.Connect(RemoteAddr, RemotePort)


I got these errors

C:\Program Files\PowerTCP\Telnet Tool\Samples\VB.NET\Client\Main.vb(248): Argument not specified for parameter 'charRows' of 'Public Overridable Sub Rlogin(remoteName As String, user As String, serverUser As String, termTypeSpeed As String, charRows As Integer, charsPerRow As Integer, pixelsX As Integer, pixelsY As Integer, remotePort As Integer, localName As String, localPort As Integer)'.

C:\Program Files\PowerTCP\Telnet Tool\Samples\VB.NET\Client\Main.vb(256): Argument not specified for parameter 'localName' of 'Public Overridable Sub Rexec(remoteName As String, user As String, password As String, command As String, remotePort As Integer, localName As String, localPort As Integer)'.

C:\Program Files\PowerTCP\Telnet Tool\Samples\VB.NET\Client\Main.vb(248): Argument not specified for parameter 'localName' of 'Public Overridable Sub Rlogin(remoteName As String, user As String, serverUser As String, termTypeSpeed As String, charRows As Integer, charsPerRow As Integer, pixelsX As Integer, pixelsY As Integer, remotePort As Integer, localName As String, localPort As Integer)'.

C:\Program Files\PowerTCP\Telnet Tool\Samples\VB.NET\Client\Main.vb(252): Argument not specified for parameter 'localName' of 'Public Overridable Sub Rsh(remoteName As String, user As String, command As String, remotePort As Integer, localName As String, localPort As Integer)'.

C:\Program Files\PowerTCP\Telnet Tool\Samples\VB.NET\Client\Main.vb(248): Argument not specified for parameter 'pixelsX' of 'Public Overridable Sub Rlogin(remoteName As String, user As String, serverUser As String, termTypeSpeed As String, charRows As Integer, charsPerRow As Integer, pixelsX As Integer, pixelsY As Integer, remotePort As Integer, localName As String, localPort As Integer)'.

and several more
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 7, 2004 1:33 PM

The way optional params are done in Visual Basic .NET changed with the latest service pack. If you get this error, it means that you now have to specify a value for that parameter.

First I would try "" for all the strings and 0 for the numbers.

AlEdlund

From: Crystal Lake, IL USA
Posts: 26
Member Since: 06/25/04
posted December 7, 2004 1:42 PM

I kinda suspected the stiffer optional parameter checking. I just short cut it by going to the simpler definition (a lot less parameters to guess what the default ought to look like) ;-)
Al
Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX