Use ollydebug to view the DLL module called by the program

Source: Internet
Author: User

Recently, I was working on a QT project, which had been plagued by the failure to find the DLL components missing by the program when the product was released. The specific problem is that I used qmediaplayer to play an audio file in my project. I used win7 32-bit in the development environment. When I published the installation package, remove the environment variables related to Qt as usual, and run the executable program, prompting me to copy the corresponding DLL to the directory of the executable program, until the program can start and run normally. According to the above method, I made the software installation package. However, when I installed the software on the XP system for testing, I found that the program had no sound. This problem made me very entangled.

Later, I found a clue on the Internet, that is, to view the DLL module called by the executable program through the software, and then I can view the information of the listed DLL module, add the missing ones. I chose ollydebug, which is commonly used. Ollydebug is a very powerful 32-bit assembly and analysis debugger, and is also the most popular decryption tool. A New Visual Dynamic Tracing tool that can completely replace SoftICE, is currently the most powerful debugging tool that can handle problems that other similar software cannot handle. You can customize the appearance and running parameters, support multiple data formats, support code highlighting and multi-threaded height, and automatically analyze the running process and loop statements of functions, the readability of binary code can be increased to make debugging easier. It is possible to save the debugged program as a file separately and continue to load and use it.

 

I shared the English and Chinese versions of the software here:

Http://pan.baidu.com/s/1i3oUsuD

Http://pan.baidu.com/s/1o6qfZmU

 

Because the software features are too powerful, I can only address the problems I encountered here. I will introduce how to find the DLL module called by the program. Here I use the English version.

First, extract the package and run the executable files, such:

After opening the program, we need to open the executable file to be observed (*. EXE), click "file-> open" in the menu, and find the corresponding executable program in the pop-up file dialog box, as shown in.

After the software is opened, the main interface of ollydebug is shown as follows:

Then, select "View-> executable modules" from the menu to go to the page shown in the following figure, which lists the DLL modules currently loaded by the observed executable program.

Next, we need to run this program at full speed to observe the changes in the loaded DLL module. Click "run" in the red box.

Then, we can see that the program starts to load the DLL and lists it. The recently called DLL is marked in red, as shown in.

We can check in sequence whether the listed dll has been copied to the executable directory. Note: you do not need to worry about the DLL in the called system file. We only care about whether the DLL provided in the class library has been copied.

 

Conclusion: when using multimedia in the QT application, you must add the mediaservice directory in the Plugins to the executable directory. The path on my platform is C: \ QT \ qt5.1.1 \ 5.1.1 \ mingw48_32 \ plugins \ mediaservice. Otherwise, the program may not work properly, but no error is prompted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.