Page 1 of 1

MFC Toolbar items recognition does not work for Win64

Posted: Fri Oct 12, 2012 6:12 pm
by lsemkiv
Hello,

We are working on UI automation script for MFC/ATL based application and encountered a problem recognizing MFCToolbar items. The problem is only for Win64 version of the app, for Win32 Ranorex Spy (32) with parent class added to GDI Capture List detects the items as RawImage elements without any problems but for Win64 does not (surely we use Renorex Spy 64 for Win64 app).

We also created test 64bit MFC application with only one element - ToolBar with the same style as in our App and Ranorex successfully coped with it. We tried to reproduce the same settings for test app as for the testee app. But the results are that Ranorex Spy detects the items (as RawImage) for test application but doesn't for the app to be automated.

We also found that for both platforms (x86, x64) after injecting ranorex DLL, exceptions like: "Read violation at address: 0xFFFFFFFFFFFFFFFF" are being raised (seems like in Ranorex.Injector module) (we see it in Output window of Visual Studio as first-change exceptions).

Ranorex version used: 3.3.3.19655 (.NET Runtime 4.0.30319)
Visual Studio 2008 SP1 ( CRT: 9.0.21022.8, MFC: 9.0.21022.8, ATL: 9.0.21022.8)

Compilation string (Debug configuration exposed, but the problem is for all configurations):
/Od /D "WIN32" /D "_WIN64" /D "_DEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_ATL_DLL" /D "_VC80_UPGRADE=0x0710" /D "_AFXDLL" /FD /EHa /MDd /Yu"yyy.h" /Fp".\Debug/xxx.pch" /Fo".\Debug/" /Fd".\Debug/" /W3 /nologo /c /Zi /TP /errorReport:prompt

Would be very grateful for your help.

Re: MFC Toolbar items recognition does not work for Win64

Posted: Mon Oct 15, 2012 3:17 pm
by Support Team
Hello,

Could you please send us two Ranorex Snapshot files from this item? One Snapshot file from the 32bit version and one of the (not working) 64bit version.

Regards,
Bernhard
Ranorex Support Team

Re: MFC Toolbar items recognition does not work for Win64

Posted: Mon Oct 15, 2012 4:44 pm
by lsemkiv
Hello,

Please find archive with snapshots in attachments.

Thanks.

Re: MFC Toolbar items recognition does not work for Win64

Posted: Tue Oct 16, 2012 3:35 pm
by Support Team
Hello!

Thank you for your snapshots.

We found out that the class name for the elements is different in the 64-bit version compared to the 32-bit version as shown below:

Element '59392':
class name (32-bit) 'Afx:ToolBar:400000:8:10005:10'
class name (64-bit) 'Afx:ToolBar:40000000:8:10005:10'

Please delete the entries of the 'GDI Capture Settings' and try to add the process name from the form 'ReMetrica Enterprise Edition' to the 'GDI Capture List'.

Regards,
Markus (T)
Support Team

Re: MFC Toolbar items recognition does not work for Win64

Posted: Wed Oct 17, 2012 10:30 am
by lsemkiv
Hello,

This should not be an issue since we add parent class to GDI capture list each time. Also, provided snapshots have been taken by different versions of Ranorex (Ranorex for Win64 and Ranorex (32) for Win32).
Anyway I've followed you instructions and results are still the same.

Thanks for your help,
Lyubomyr

Re: MFC Toolbar items recognition does not work for Win64

Posted: Wed Oct 17, 2012 2:19 pm
by Support Team
Hello Lyubomyr,

We tested this case in our own MFC app successfully by using GDI plugin.
Is it possible to send us your app to reproduce this issue?

Regards,
Markus (T)
Support Team

Re: MFC Toolbar items recognition does not work for Win64

Posted: Thu Oct 18, 2012 4:22 pm
by lsemkiv
Hello,

Unfortunately we can't provide application for testing as we are bind by NDA. Alternatively we can setup WebEx/TeamViewer call to demonstrate you an issue. Please let us know if that's a possible option.

We hoped that exception thrown by Ranorex (details are provided in first comment on this thread) may help to identify an issue. If there is anything else we can provide to troubleshoot this issue - please let us know.

We have started looking into workarounds for this issue. One of the ideas is making Windows API direct calls as we have checked that Toolbar elements are visible. But it's upsetting that we can't rely on Ranorex tool as we planned using it for automation.

Thank you.

Re: MFC Toolbar items recognition does not work for Win64

Posted: Fri Oct 19, 2012 1:19 pm
by Support Team
Hello,

The best way to find a solution would be a sample application that reproduces the same behavior as your application. Is it possible to send us such a sample application?

We could do a remote session if Visual Studio is installed on your system.
Please send us an email when do you have time for a remote session.

Regards,
Markus (T)
Support Team

Re: MFC Toolbar items recognition does not work for Win64

Posted: Fri Oct 19, 2012 1:41 pm
by lsemkiv
Hello,

We are working on creating such simple application now.

Will you be able to meet on Monday/Tuesday between 12:00 - 02:00 p.m. GMT 00:00 ? I have Visual Studio installed on my machine.

We can setup a WebEx call using our corporate account, or please send me details of the conference you'd like to use.

Thank you.

Re: MFC Toolbar items recognition does not work for Win64

Posted: Mon Oct 22, 2012 10:11 am
by Support Team
Hello,

Thank you for your reply.

We don't make appointments for remote sessions via forum.
Please send us an email to [email protected].

Regards,
Markus (T)
Support Team