Re: wodSSH in C++ Builder - WeOnlyDo Discussion board

Re: wodSSH in C++ Builder (General questions)

by Ryan Crosby, Thursday, September 01, 2005, 17:25 (7022 days ago) @ wodSupport

The Execute() method calls for tagVARIANT, so I'm converting expected AnsiStrings to a VARIANT like this:

VARIANT v1;
VariantInit(&v1);
v1.vt = VT_BSTR;
v1.bstrVal = WideString(SomeAnsiString);

SSH->Execute(wchar_t *, v1, tagVARIANT Timeout);

Then I'm using Execute() to find this next prompt, and then I clear the VARIANT when I'm done with it. Does this look right?


Complete thread: