Log in

View Full Version : Help with a real RCE problem


naides
March 13th, 2003, 20:40
I am having a rather annoying problem with a piece of software, which I am not going to name here, but could be asked in private. It has no real comercial value in any case, because is useless unless it is tied to a $500K instrument.

The problem:

One of the functions of the instrument is controlled by clicking on the different rows of a spread-sheet like window. The Software has a bug, and I cannot select any row that I need, or modifiy parameters in that row. It acts as a grayed-out option.

I called the company and a they went through several options, trying to correct the problem. I know it is not a problem of the instrument, or the hardware interface, because I can test it with the service utilities and It works fine. They eventually threw their hands on the air and told me "we will get back to you" 7 days ago.

I have no alternative, there is not an alternative software that can operate the instrument.

I also know that the software package works OK in other computers, so the problem is idiosyncratic to my BOX.

I reainstalled, not only the software, but the whole operating system, to no avail.

I have tried to trace the code that handles my clicking on the row, by using Sice, and a API spy utility. I placed a BMSG handle_of_the_window
WM_Lbuttonup.

Sice breaks into MFC42.dll. I can trace through the code in User32 that deciphers the message, to a short piece of code inside the application main exe, which gets called cosntantly, and dipatches a message.

What I need to find is the piece code that handles the OnClick event. I know Kayaker (Hi Kayaker, please help me if you read this) have explained some methods to do such a feat in "ungraying" buttons tuts.

I need sugggestions.
I think the problem has to do with the way the software converses with MFC42.dll but I am weary of messing with this system file.

Thanks in advance

Solomon
March 13th, 2003, 20:52
try to get the corresponding MFC42.NMS(MFC70.NMS for VC7), it may help u to understand the MFC framework under SoftICE.

If u install VC++ 5/6, you can generate MFC42.NMS from MFC42.PDB/MFC42.MAP, which reside in your system dir.

I can upload MFC42.NMS + MFC42.DLL if you can't get it. about 4MB(no MFC source packaged in it)

Kayaker
March 13th, 2003, 23:50
Hi naides, are you sure it's that dll causing the problem? Just a thought, but the spreadsheet is likely a listview whose mouse click notifications are controlled by Comctl32.dll and versions inadvertently get overwritten by some software. I recently had a problem with a common control not behaving correctly because of an incorrect version. (Can you confirm with a class monitor what type of common control it is, and with a message monitor what messages *other* than the button clicks are being sent?)

There are several important common control notifications sent in the form of a WM_NOTIFY message that require version 4.71 or later for example,
NM_CLICK - Sent by a list-view control when the user clicks an item with the left mouse button.
LVN_ITEMACTIVATE - Sent by a list-view control when the user activates an item

If you have IE5 installed, which might not be the case with your instrument, you'd have version 5.81, there's nine of them from 4.0-6.0. Especially with the software that comes with these types of instruments (often outdated, more often poorly written .-), you'll want to match the date written with an appropriate version. If it's not this we can look at something else.

Kayaker

naides
March 14th, 2003, 00:38
Thanks Solomon and Kayaker, you are always helpful. I will examine your suggestions tomorrow and get back for more, if they do not work. I wish I could get more in-dept info about the Software, but: 1) I cannot load a lot of RCE tools in the computer because of supervision/security issues

2) I cannot load the software into my home computer, it does not work without the hardware attached.
Kinda tight eh?

naides
March 17th, 2003, 18:53
Just to let you know that the solution for my problem was in the general direction that Kayaker point out.

Talking about lousy developed software, it overwrote, at the end of the installation, another, previous version of a dll, which was responsible for the control that was faulty. A listview variant.

Thanks to kayaker suggestions I was able to isolate the dll and remedy the situation.

You are awsome!

Kayaker
March 18th, 2003, 18:03
Naides, Great! Lucky guess I guess. I've had enough exposure to similar types of software tied to equipment of this sort, probably know your brand name too, and, well, just find it pretty crappy sometimes ;-) Still even the realm of 16 bit code at times. 16 bit code and a dongle protection, and a JZ patch around a message box..., /me shakes head at the piss poor implementation sometimes, lol.

So these guys had a dll which handled their *own* listview-style control drawing and handling functions? Or is the dll tied to the way MFC handles it?

Kayaker