EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Setting termtype

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#3720
Posted: 09/07/2007 16:37:17
by Wirt Atmar (Standard support level)
Joined: 09/07/2007
Posts: 3

Gentlemen,

I purchased BlackBox a few weeks ago to add SSH to our various client software,
all of which is written in VB6. I've been writing in VB6 for a fair number of years
now, indeed ever since VB3, but I'm getting an error message with your code that
has me completely stumped.

I'm trying to set the terminaltype for our terminal emulator to be "HP", which is critical
in our case. The code that I'm doing this is this:

ElSSHClientX1.UserName = SSHUser
ElSSHClientX1.Password = SSHPassword
ElShellSSHTunnelX1.TerminalInfo.TerminalType = "HP"

Everything works perfectly other than the terminal info command. I can sign on and conduct
sessions with ease with any number of various UNIX and LInux hosts, but the TerminalType
property is not being set, and I'm getting a VT100-like terminal by default.

As I type the line of text in, the ElShellSSHTunnelX1 object is obviously being
recognized because it gives its property values, TerminalInfo, being one of them. As
I type that in, the TerminalType property is next properly displayed, thus I am relatively
sure that I have everything I need at hand in the components list. But VB6, when it
executes, is returning this error:

<object variable or with block variable not set>

and that totally befuddles me.

I would greatly appreciate some advice as to what I need to do to rectify this problem.

Best regards,

Wirt Atmar
AICS Research, Inc.
University Park, NM USA
#3726
Posted: 09/10/2007 06:06:16
by Ken Ivanov (EldoS Corp.)

Thank you for your message.

You need to create an ElTerminalInfoX object, set up its properties and assign it to ElShellSSHTunnelX.TerminalInfo property.
#3730
Posted: 09/10/2007 21:15:09
by Wirt Atmar (Standard support level)
Joined: 09/07/2007
Posts: 3

Quote
Innokentiy Ivanov wrote:
Thank you for your message.

You need to create an ElTerminalInfoX object, set up its properties and assign it to ElShellSSHTunnelX.TerminalInfo property.


I very much appreciate your response, but before I initially wrote I spent two days trying to do exactly that, and today, following your response, I've spent another day repeating much of that work, trying to get it to work, following your sentence as completely as I could.

There a number of ways to create an object in VB6 and assign its properties, but none of the half-dozen ways that I've tried have been successful. Nor have any of my attempts at emulating your examples that appear in your VB6 samples.

The problem is, I'm sure, the process seems simple from your end, but it's wholly a guessing game from mine. You simply know things about the construction of your modules that I don't.

I would greatly appreciate an explicit example that I could work from regarding setting TerminalType.

Best regards,

Wirt ATmar
#3733
Posted: 09/11/2007 01:18:38
by Ken Ivanov (EldoS Corp.)

Please use the following code:
Code
Dim info as IElTerminalInfoX

Set info = CreateObject("SSHBBoxCli.ElTerminalInfoX")
info.TerminalType = "vt220"
ElShellSSHTunnelX1.TerminalInfo = info
#3740
Posted: 09/11/2007 21:33:46
by Wirt Atmar (Standard support level)
Joined: 09/07/2007
Posts: 3

Quote
Innokentiy Ivanov wrote:
Please use the following code:
Code
Dim info as IElTerminalInfoX

Set info = CreateObject("SSHBBoxCli.ElTerminalInfoX")
info.TerminalType = "vt220"
ElShellSSHTunnelX1.TerminalInfo = info


Thank you very much. I tried exactly this method several times, but without the confidence that I was going down the right path, some small error must have kept it from working. Under any circumstance, it works very well now.

To return the favor, you have code like this throughout your VB6 examples:

For i = LBound(v) To UBound(v)
result = result + Chr(v(i))
Next
ByteArr2Str = result

This can be replaced by the simpler line of code:

ByteArr2Str = StrConv(v, vbUnicode)

This second bit of code executes significantly faster than does the iterated concatenation of the first example, especially for large arrays.

Thanks again,

Wirt Atmar
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 2240 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!