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

by Ryan Crosby, (7184 days ago) @ Jasmine

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?

locked

Complete thread: