Solved

Changing the properties of a DLL

Posted on 2003-11-15
11
283 Views
Last Modified: 2012-05-04
Here's the situation.  We're using a 3rd party software product which is no longer being supported.

In a certain part of the application, the user is asked to choose between two radio buttons.   However, we don't want the users to make this choice:  we always want them to choose the 1st of the two radio buttons.

Now we know the DLL file this screen is contained within.  What we'd like to do is somehow access this DLL (we know it's written in VB 6.0) and set the properties of the one radio button to be NOT visible.  

We have ZERO access to any source code, and the company that bought our vendor no longer supports this product and is asking some astronomical amount of money to fix this issue.  

Any hints, tips or suggestions are greatly appreciated.  
0
Comment
Question by:EschbacherG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
11 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 9755118
You could use code like this to find the handle to that radio button:
http://www.mvps.org/vbnet/index.html?code/enums/enumwindowsdemo.htm

And then you use something like this to hide it:

'declarations
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0

'hide button
Call ShowWindow(radioWindowHandle, SW_HIDE)
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9756959
Please maintain your open questions:

1 10/06/2003 250 Lotus Notes agent to download entire doc...  Open Lotus Notes
2 09/29/2003 333 Forwarding emails is slow  Open Lotus Notes
3 09/12/2003 250 Network Neighborhood information...  Open Windows NT Networking
4 08/20/2003 404 Parse an XML file and split it into smal...  Open XML

Thanks,
Anthony
0
 
LVL 2

Author Comment

by:EschbacherG
ID: 9760199
acperkins....

Those questions are still open because they haven't been satisfactorily answered.  But thanks for the unfriendly reminder.

As to my current question, I have found a tool that might, and i'm wondering if anyone had similar experiences with it.

It's called PE-Explorer.  It's a disassembler for portable-executable files, and it allows you to edit some of the resources.  On DLL's related to AOL instant messenger, I was able to see and edit various popup screens.  Not as much luck with my DLLs.

AzraSound,

We initially looked into something along your suggestions.  What we had was a program running in the background that would periodically grab handles to windows, and by comparing the window title, we could tell if the users were where they belonged.  (If they selected the wrong radio button, it would bring them to another window).

However, our management described this as being too much of a "kludge", and in our production environment, it was decided that having programs watching programs added to elements of instability.  

Does anyone else have experience with editing resources?  I've tried a few programs (Resource Hacker) as well as just looking at the Hex code, but couldn't find anything good.

Thanks for any assistance!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9760411
>>Those questions are still open because they haven't been satisfactorily answered.<<
The chances that someone will answer a question that is nearly 3 months old is exaclty 0.
Questions that have gone more than 21 days without feedback are considered technically abandoned.

>>But thanks for the unfriendly reminder.<<
I am sorry you feel that way.  Feel free to post a message in Community Support, if you believe my comments are inappropriate.  If not please, please go ahead and maintain those questions.

Thanks,
Anthony
0
 
LVL 28

Assisted Solution

by:AzraSound
AzraSound earned 500 total points
ID: 9761019
"Reading Data from Local or External Library Resources"
http://www.vbaccelerator.com/codelib/resource/extres.htm
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9761442
Thank you for maintaining your open questions, but I believe you may have overlooked these two:

1 08/20/2003 404 Parse an XML file and split it into smal...  Open XML
2 09/12/2003 250 Network Neighborhood information...  Open Windows NT Networking

Thanks,
Anthony
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 10143385
And now we are just down to this question and this other one:
http://www.experts-exchange.com/Networking/WinNT_Networking/Q_20737233.html

I appreciate the effort keeping up with your open questions.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10548441
EschbacherG, an EE Moderator will delete this for you.
Moderator, my recommended disposition is:

    DELETE this question (refund points).
    *** AzraSound's link shows how to read, but not change a resource.
    *** No PAQworthy answer here.

Dan Rollins -- EE database cleanup volunteer
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 10550346
To be honest, I never understood the logic behind accessing/changing resources since the issue was with hiding a radio button.
0
 
LVL 2

Author Comment

by:EschbacherG
ID: 10551394
My original hope was that there was a way to view and change the resources within a DLL, allowing us to disable the radio button in question.   While Azra's recommendation looks good, it would require an external program peeking into to disable it.    We currently have a temporary fix like that:  we have a program that constantly monitors for a Window title that is the title that appears if the user clicked on the wrong radio button.  The problem is the client thinks of this as a real kludge, and was looking for a cleaner way.  

In the end, we opted for a very simple solution:  a big email out to our user population reminding them to never click it.   We are also upgrading our software to a newer version, and the vender has taken our recommendation and implemented it.  

(FYI:  The real this is a big problem is that the software is used to reconcile point-of-sale transactions, involving  large checks that get mailed in to a large city government.  By choosing the wrong radio button, it changes the way the money is reconciled, messes up the nightly batch job and the generated reports).  

Thanks again for your assistance guys.  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question