New topic: 

Error compiling using Activex

<http://forums.realsoftware.com/viewtopic.php?t=34258>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        jimcorr          Post subject: Error compiling using 
ActivexPosted: Sun Jun 13, 2010 11:56 am                         
Joined: Sun Jun 13, 2010 11:40 am
Posts: 1                Hi Guys!

I'm totally newbie in RealBasic, and i just can't figure out a
solution for this.

I'm using a Chilkat SSH activeX, it works fine in almost all the methods.

But there's one that requires another object (from the same dll) as one of the 
parameters.

let's resume my code here, SFTP and SKEY are objects and they are in my window 
properly inserted :

dim success as integer

success = sftp.authenticatepk("username", skey)

Then i get this error in compilation:

Paremeters are not compatible with this function.

Looking in the ChilkatSFtp's method authenticatepk created
automatically by RB, there's this:

------------------------------------------------------------------------------------------------------------------------------Method_name:
 AuthenticatePk

Parameters: username_Param As String, privateKey_Param As
CHILKATSSHLib.IChilkatSshKey

Return type: Integer

 If mThis = Nil Then Raise New NilObjectException
 Dim func As New AuthenticatePk_Func3(mThis.Ptr( 0 ).Ptr(108 ))
 Dim resultCode As Integer
 Dim Local_username_Param As Ptr
 Local_username_Param = COM.SysAllocString( username_Param )
 Dim Local_privateKey_Param As Ptr
 Local_privateKey_Param = privateKey_Param.Handle
 Dim Return_pVal_Param As Integer
 resultCode = func.Invoke(mThis, Local_username_Param,
Local_privateKey_Param, Return_pVal_Param)
 COM.SysFreeString(Local_username_Param)
 If resultCode = 0 Then
 Return Return_pVal_Param
 Else // Throw Exception
 Raise New COM.COMException("Failed on AuthenticatePk", resultCode)
 End If

------------------------------------------------------------------------------------------------------------------------------
Looking in the component Skey, it's super is ChilkatSshKey

------------------------------------------------------------------------------------------------------------------------------

I tried the same idea of the code on vbscript, and this WORKS :S

set skey = CreateObject("Chilkat.SshKey")

success = sftp.AuthenticatePk("suporte",skey)
If (success <> 1) Then
 MsgBox sftp.LastErrorText
 WScript.Quit
End If

------------------------------------------------------------------------------------------------------------------------------

Thanks for your help!

Rafael   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to