MFC Toolbar items recognition does not work for Win64

Ranorex Spy, Recorder, and Studio.
lsemkiv
Posts: 5
Joined: Fri Oct 12, 2012 5:31 pm

MFC Toolbar items recognition does not work for Win64

Post by lsemkiv » Fri Oct 12, 2012 6:12 pm

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.

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

Re: MFC Toolbar items recognition does not work for Win64

Post by Support Team » Mon Oct 15, 2012 3:17 pm

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
.
Image

lsemkiv
Posts: 5
Joined: Fri Oct 12, 2012 5:31 pm

Re: MFC Toolbar items recognition does not work for Win64

Post by lsemkiv » Mon Oct 15, 2012 4:44 pm

Hello,

Please find archive with snapshots in attachments.

Thanks.
Attachments
RanorexSnapshots.zip
(457.33 KiB) Downloaded 209 times

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

Re: MFC Toolbar items recognition does not work for Win64

Post by Support Team » Tue Oct 16, 2012 3:35 pm

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
.
Image

lsemkiv
Posts: 5
Joined: Fri Oct 12, 2012 5:31 pm

Re: MFC Toolbar items recognition does not work for Win64

Post by lsemkiv » Wed Oct 17, 2012 10:30 am

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

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

Re: MFC Toolbar items recognition does not work for Win64

Post by Support Team » Wed Oct 17, 2012 2:19 pm

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
.
Image

lsemkiv
Posts: 5
Joined: Fri Oct 12, 2012 5:31 pm

Re: MFC Toolbar items recognition does not work for Win64

Post by lsemkiv » Thu Oct 18, 2012 4:22 pm

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.

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

Re: MFC Toolbar items recognition does not work for Win64

Post by Support Team » Fri Oct 19, 2012 1:19 pm

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
.
Image

lsemkiv
Posts: 5
Joined: Fri Oct 12, 2012 5:31 pm

Re: MFC Toolbar items recognition does not work for Win64

Post by lsemkiv » Fri Oct 19, 2012 1:41 pm

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.

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

Re: MFC Toolbar items recognition does not work for Win64

Post by Support Team » Mon Oct 22, 2012 10:11 am

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