Re: No value in PrivateKey property. - WeOnlyDo Discussion board

Re: No value in PrivateKey property. (General questions)

by Rob, Friday, July 06, 2007, 15:45 (6350 days ago) @ wodDamir

I already checked out that code.

the problem is that the wrapper made the sftp.privateKey methode like this:
// Description: Private key used for authentication.
COMVariant PrivateKey(COMVariant _PrivateKey = COMVariant::createNoValue())
{
COMVariant c = new COMVariant();

c = self.PrivateKey(_PrivateKey);
return c;
}
so i have to pass the key.privateKey(1) as/in a comvariant object.
wich can be a bStr, but from PrivateKeyData i get an array..
how do i make the array to a str?

this dous not work..
types = keys.PrivateKeyData(1);
privateKey.safeArray(types,COMVariantType::VT_I4);
sftp.PrivateKey(PrivateKey);
it give a error, 'Private key could not be determinated'


Complete thread: