InvokeRemotely

Ask general questions here.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

InvokeRemotely

Post by atom » Mon May 10, 2010 4:40 pm

Hiya

Im haveing trouble using Invoke Remotely on the Dev Express demo application you can download from their website. I am using the XtraEditors demo application, and which to invoke upon a ButtonEdit control.

Here is my code:

Code: Select all

Module Module1

    Sub Main()

        Dim objForm As Ranorex.Form
        Dim objFileName As Ranorex.Control

        'get form
        objForm = Host.Local.FindSingle(Of Ranorex.Form)("/form[@controlname='FrmMainXtraEditors']")

        'get file name text box
        objFileName = objForm.FindSingle(Of Ranorex.Control)("descendant::" & "control[@controlname='buttonEditSample']")
        'set text
        objFileName.InvokeRemotely(AddressOf DXTextBoxHelper.delSetText, "hello")


    End Sub


End Module
and

Code: Select all

Public Class DXTextBoxHelper

    Public Shared Function delSetText(ByVal EditorControl As System.Windows.Forms.Control, ByVal notused As Object) As Integer


    End Function

End Class


As you can see the delegate does nothing
However when i run this I get an exception:

"Action Invoke Remotely failed on element {unknown:buttonEditSample}"

Help?!!

Regards

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: InvokeRemotely

Post by atom » Mon May 10, 2010 4:56 pm

Follow-up:

The inner-exception details are:

{"The system cannot find the file specified. (Exception from HRESULT: 0x80070002)":Nothing}

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: InvokeRemotely

Post by Support Team » Tue May 11, 2010 5:45 pm

I have just tried your code with DevExpress 8.3.4 and everything worked out right. It might be a security problem, since the error message complains about not being able to find a file.

Please, make sure that neither the AUT, nor the automating executable are located on a network drive or in an encrypted folder. And make sure that both applications are started using the same security rights (same user account).

If that does not help, could you please post the complete exception message (got by calling exception.ToString(); that includes a stack-trace and all inner exception messages)!

Regards,
Alex
Ranorex Team
.
Image